I’ve been experimenting with setting versions for my projects in gradle.properties. I noticed some gradle.properties aren’t being read, which seemed odd to me, but I’ve only recently been deep diving into gradle. So I won’t be surprised to be incorrect.
I have a top level multi-project build that’s acting as an umbrella build. I have a nested multi-project that has a couple of subprojects. None of this is using composite builds, which is where I think I should end up, but wanted to understand this anyways. Here’s the structure:
umbrella proj - settings.gradle (includes multi-proj:libA) - gradle.properties (1) - multi-proj (includes libA) -- gradle.properties (2) -- libA --- gradle.properties (3)
To test this out, I’ve been running
gradle jar in the umbrella directory. If I set the version in (1), libA’s jar file name includes that. If I set version in (3), it uses that instead of (1). If I unset it in (3) and set it in (2), it ignores (2) and uses (1).
Give this text from build environment section of the docs, I assumed that (2) should also be read at some point:
gradle.propertiesin the project’s directory, then its parent project’s directory up to the build’s root directory.
I’d appreciate any insight on if my assumptions are faulty