Question

I am trying to configure gradle for a multiproject environment.

My project structure is as follows:

MainProject
--external
  --A
  --B
  --C

I have been able to configure the build.gradle and the settings.gradle file for the MainProject.

The problem that I have is that both subprojects A & B depend on C

In project A 's build.gradle

apply plugin: 'android-library'

dependencies {
    compile fileTree(dir: 'libs', include: '*.jar')
    compile project('../C')
}

Gradle says unable to find project with path ../C. What path should I put in there?

Was it helpful?

Solution

Try with:

compile project(':external:C')

For more details about project paths see section 56.5 in the Gradle user guide.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top