This question has already been answered:
- Gradle modular dependencies 1 answer
There is the following structure
MainProject settings.gradle build.gradle Proj1 build.gradle Proj2 build.gradle In the MainProject/settings.gradle I prescribe projects
include 'Proj1', 'Proj2' Proj2 requires classes from Proj1 , so in Proj2/build.gradle I am writing
dependencies { compile project(':Proj1') //other dependencies } When I do gradle :Proj2:compileJava I have written that the package (from Proj1 ) was not found, so the compilation ended with an error.
What am I doing wrong?