Вопрос

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?

Это было полезно?

Решение

Try with:

compile project(':external:C')

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

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top