We have a set up with 2 project, 1 main and 1 subproject, they are Java projects. They are all under the same directory.
Here is how the directory structure looks like :
./dev
./Project_A
build.gradle
settings.gradle
./Project_B
build.gradle
Project_A includes Project_B.
Project_A settings.gradle looks like :
includeFlat 'Project_B'
Project_A build.gradle contains :
compile project(':Project_B')
The issue Project_A misses the classes from Project_B when compiling from command line (gradlew clean build). It looks like Project_B does not belong to Project-A's classpath.
Here is (a part of the ouput) from gradlew clean build ran in Project_A directory (after that it is all "package project_b.x.y missing" and "cannot find symbol" (from Project_B) :
:clean
:Project_B:clean
:Project_B:compileJava
:Project_B:processResources
:Project_B:classes
:Project_B:jar UP-TO-DATE
:compileJava
...Starts erroring out here...
I would guess it is a classpath issue, but I just cannot figure out how to fix it.
Thanks in advance, JM
PS : edited question as I was able to reproduce the issue with a 2 projects build (from 3 initally)
settings.gradle
. For detailed information on multi-project builds, see the "multi-project builds" chapter in the Gradle User Guide, and the many samples in the full Gradle distribution. – Toomeysettings.gradle
is in the wrong directory. – Toomey