This message was deleted.
# community-support
s
This message was deleted.
f
Copy code
tasks.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? 🤔
v
While you should better not ask the root project, but just the current project (properties should be inherited), it sounds strange. Can you provide an MCVE? Because from what you showed I'd say it should work as you expect.
👀 1
f
v
Well,
build-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.
f
Aha, I see. Hmmm... okay, perhaps I can give that a try later, all I need for now is just some simple defined tasks that dose some folder parsing and generate some files. And I would like to keep those script in
build-logic
. Perhaps can wrap it up into some pseudo-plugin and referece in a gradle.build.kts inside root project. Thanks a lot :)