The construction of FladleConfigImpl for individual configs, seen here, passes all of the values directly. This is a problem for properties using the Property API: since the entire Property object is shared, the value cannot be overridden for individual configurations.
For example, in a configuration like this:
fladle {
// ...
localResultsDir.set("output")
configs {
create("firstConfig") {
// ...
localResultsDir.set("output-firstConfig")
}
create("secondConfig") {
// ...
localResultsDir.set("output-secondConfig")
}
}
}
The result of this is that every config, including the root config, end up with localResultsDir set to output-secondConfig.
I'm not sure of the "right" way to fix this - at the very least there would need to be a new property I think... something like this?
localResultsDir = project.objects.property<String>().value(project.provider { localResultsDir.get() })
The construction of
FladleConfigImplfor individual configs, seen here, passes all of the values directly. This is a problem for properties using thePropertyAPI: since the entirePropertyobject is shared, the value cannot be overridden for individual configurations.For example, in a configuration like this:
fladle { // ... localResultsDir.set("output") configs { create("firstConfig") { // ... localResultsDir.set("output-firstConfig") } create("secondConfig") { // ... localResultsDir.set("output-secondConfig") } } }The result of this is that every config, including the root config, end up with
localResultsDirset tooutput-secondConfig.I'm not sure of the "right" way to fix this - at the very least there would need to be a new property I think... something like this?