I have 3 projects. fc
is the root project.
project fc
depends on conf
and conf
depends on base
base
build.gradle
apply plugin: 'java'
conf
build.gradle
apply plugin: 'java'
dependencies {
implementation project(':base')
}
fc (root project)
build.gradle
apply plugin: 'java'
dependencies {
implementation project(':conf')
}
settings.gradle
include ':conf'
project(':conf').projectDir = new File(settingsDir, '../conf')
include ':base'
project(':base').projectDir = new File(settingsDir, '../base')
When I run gradle build
from fc
project, I get below compilation error.
> Task :compileJava FAILED
/home/adithyan/all-files/coding/repo/office-git/build-script/mod2/gradle-test/fc/src/main/java/fc/FcClass.java:3: error: package abc does not exist
import abc.BaseClass;
^
/home/adithyan/all-files/coding/repo/office-git/build-script/mod2/gradle-test/fc/src/main/java/fc/FcClass.java:9: error: cannot find symbol
BaseClass bc = new BaseClass();
^
symbol: class BaseClass
location: class FcClass
/home/adithyan/all-files/coding/repo/office-git/build-script/mod2/gradle-test/fc/src/main/java/fc/FcClass.java:9: error: cannot find symbol
BaseClass bc = new BaseClass();
^
symbol: class BaseClass
location: class FcClass
3 errors
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':compileJava'.
> Compilation failed; see the compiler error output for details.
The error indicates, that the classes in the base
project are not available to the compilation process of project fc
.
Why?