Gradle Multiproject

廉价感情. 提交于 2019-12-10 20:47:12

问题


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?


回答1:


Try with:

compile project(':external:C')

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



来源:https://stackoverflow.com/questions/22746402/gradle-multiproject

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!