I was thinking about submitting an issue on gradle/gradle, but thought I’d ask here first.
I created a repo with a descriptive README about the issue here:
Essentially, depending on application jars from another module when using nested submodules fails to properly depend on the jar task (only when the nested hierarchy is deeper than one or two subdirs). This setup has created other issues as well such as building jars that have all class files but cause ClassNotFoundExceptions. I focused on re-creating one of the build errors with this repo.
The first commit is a simpler project structure that passes and the second commit is a broken build with a project hierarchy with a deeper nesting. The third commit fixes the build, but it requires manually depending on the jar task for every inter-project dependency (my project has about 30 of them so it gets very unwiedly and seems very un-gradley).
I’ve been using gradle for a decade and have never had this complex of a project – it’s a giant organization-wide mono-repo instead of having a couple of similarly grouped modules each in their own repo.
Any suggestions on what I can do with my build configuration to correctly resolve the second commit’s build or where I can start diving into the gradle source to find a cause are greatly appreciated!