Slackbot
01/15/2024, 8:38 AMFuyang Liu
01/15/2024, 8:45 AMtasks.register("exampleTask") {
val myPropValue = rootProject.findProperty("cs.javacommon.path") ?: "default value"
println("Property value: $myPropValue")
}
I just set it up as such in a script in build-logic then the property cannot be read from the "real" root project, but can only read the properties file inside build-logic
Perhaps there is a way to read stuff at the properties defined on the parent root? 🤔Vampire
01/15/2024, 9:08 AMFuyang Liu
01/15/2024, 1:53 PMVampire
01/15/2024, 2:01 PMbuild-gen is a subproject in build-logic and build-gen/build.gradle.kts is its build script. So you of course read the properties of build-logic not the "parent" build. If you would have some plugin implementation in build-logic or build-gen that you then apply to the "parent" build, that would read the properties of the "parent" build.Fuyang Liu
01/15/2024, 2:06 PMbuild-logic. Perhaps can wrap it up into some pseudo-plugin and referece in a gradle.build.kts inside root project.
Thanks a lot :)