I have a project with a structure like this
/util /workbench/util (and 100+ other modules)
the workbench/util has a single dependency to the upper level util like this:
dependencies{
compile project(":util")
}
When I build this module, however, the compilation fails, with errors indicating that the dependent module cannot be found.
The compiler arguments look like this:
[org.gradle.api.internal.tasks.compile.NormalizingJavaCompiler] Compiler arguments: -d E:\code\trunk\stepx\workbench\util\build\classes\main -g -classpath E:\code\trunk\stepx\workbench\util\build\libs\util-1.0-SNAPSHOT.jar …
Notice that the dependency to the util is resolved to the workbench/util module’s OWN artifact, instead of the upper level artifact!!
I have tried to invoke the command “gradle :util:assemble” when in the workbench/util sub-directory. It does build the root level util project, as should be suspected. I also generate IntelliJ Idea modules for the project. Here, the dependency is also OK.
Renaming one of the modules is not an option, as it is an existing project with 100+ live customers, and several live branches.
Is there a viable workaround for the time being, as I suspect the described behavior is a bug you will have to fix?