Caleb B
12/07/2025, 4:56 PMgradle.properties file like it used to for Groovy? Instead of having to bind every single one manually with val foo by properties.hfhbd
12/07/2025, 5:00 PMCaleb B
12/07/2025, 5:03 PMinclude themCaleb B
12/07/2025, 5:03 PMval Project.foo by properties , can't youhfhbd
12/07/2025, 5:03 PMCaleb B
12/07/2025, 5:03 PMCaleb B
12/07/2025, 5:04 PMCaleb B
12/07/2025, 5:04 PMhfhbd
12/07/2025, 5:04 PMhfhbd
12/07/2025, 5:05 PMCaleb B
12/07/2025, 5:06 PM// buildSrc/.../my.convention.gradle.kts
val myProperty = "foo"
// build.gradle.kts
plugins {
id("my-convention")
}
println(myProperty) // can't reference itCaleb B
12/07/2025, 5:06 PMhfhbd
12/07/2025, 5:06 PMCaleb B
12/07/2025, 5:06 PMhfhbd
12/07/2025, 5:06 PMCaleb B
12/07/2025, 5:06 PMCaleb B
12/07/2025, 5:07 PMYou can have constants in a kt file in build-logicCould you explain? I've never been able to get that to work.
Caleb B
12/07/2025, 5:08 PMhfhbd
12/07/2025, 5:08 PMCaleb B
12/07/2025, 5:09 PMCaleb B
12/07/2025, 5:10 PMhfhbd
12/07/2025, 5:11 PMCaleb B
12/07/2025, 5:12 PMhfhbd
12/07/2025, 5:12 PMhfhbd
12/07/2025, 5:13 PMCaleb B
12/07/2025, 5:14 PMCaleb B
12/07/2025, 5:15 PMCaleb B
12/07/2025, 5:15 PMVampire
12/07/2025, 9:40 PMbuildSrc it is in an ancestry classloader of all project build scripts, so like the plugins available everywhere.
If it is in a proper included build, it is only available where you use it and thus does not invalidate everything unrelated, meaning, if you apply a plugin from the same project the class is available, or if you declare a buildscript classpath dependency.
Or if it is in an ancestry classloader like the settings script classloader.
Btw. "project coordinates" sounds like a bad idea, at least if you use it to manipulate a publication, that is seldomly a good idea and you should instead make the defaults work, or you for example need manual substitutions as soon as you want to use the build in a composite build and so on.