in a project root folder from a submodule? It appears that the file must be within the submodule for it to be read
g
gildor
06/08/2019, 7:09 AM
rootProject.properties
gildor
06/08/2019, 7:11 AM
Actually not sure that those properties are not exposed to submodules automatically
a
Allan Wang
06/10/2019, 1:02 AM
I tried root project already. This is specifically for build src, so I guess it might be an independent project?
g
gildor
06/10/2019, 1:24 AM
But build src is not a submodule at all, it’s completely different thing. buildSrc is just a separate gradle project, just by convention included to your build script classpath, so it have to be compiled before your rootProject even configured, because it’s part of build system now
gildor
06/10/2019, 1:26 AM
So, returning to your question if we talking about sharing properties with buildSrc
gildor
06/10/2019, 1:27 AM
In most cases you should keep any properties/configs in buildSrc, it allows you to share any classes, so no need to use dynamic properties file, so it’s a good thing
gildor
06/10/2019, 1:31 AM
Bad thing that to configure buildSrc project itself you probably want to extract some versions to buildSrc/gradle.properties, and you of course can use it in build.gradle, settings.gradle of buildSrc, but you also want to share those versions with your main project config and there is no perfect solution.
Ultimate is just read
buildSrc/gradle.properties
manually somewhere in buildSrc/src and expose it as part of build script class path (directly, or by exposing some Versions class etc)