All,
I have the following code structure: ‘root-projectA’ and ‘root-projectB’. They are 2 separate projects. ‘root-projectB’ has a lib directory that contains all the jar files that subprojects in ‘root-projectA’ need/depend on at compile time.
root-projectA —build.gradle —settings.gradle
—subproject1/
—subproject2/
root-projectB —lib/ (contain jar files)
How can I define the dependencies in root-projectA’s build.gradle, so that it can find all the jar files in root-projectB/lib to compile its subprojects successfully? I tried the following but it did not work.
root-projectA’s build.gradle: repositories {
flatDir name: ‘libRepository’, dirs: [’…/root-projectB/lib’]
}
dependencies {
compile fileTree(dir:’…/root-projectB/lib’, include:’*.jar’)
}
Thanks in advance.