Accessing properties via Providers that where set by gradle-properties-plugin

Ah, dang! :confused: So I either have the configuration cache and the providers you showed me here or the properties-plugin?

I think my use case does not profit greatly from the CC, so that will go.

Or do you have another suggestion how to store and access values for different environments?

This would work, but the properties-plugin feels so much more sophisticated…

gradle.properties:

fs.environment=local.
local.fs.host=localhost
dev.fs.host=somethingelse
...

build.gradle.kts:

val fsEnvironment = providers.gradleProperty("fs.environment")
val fsHost = providers.gradleProperty("${fsEnvironment.orNull}fs.host")
...