Gradle configuration with multi-module android library

≡放荡痞女 提交于 2019-12-03 15:05:43

You should do something like this:

root:
  |- test_app (apk just for testing, not deployed anywhere)
  |- core 
  |- extra_1
  |- extra_2
  |- extra_ ... etc
  |- android-sdk

In core/build.gradle:

apply plugin: 'com.android.library'
//...

In extra1/build.gradle:

apply plugin: 'com.android.library'
//...
dependencies {
   compile project(':core')
}

In android-sdk/build.gradle:

apply plugin: 'com.android.library'
//...
dependencies {
   compile project(':core')
   compile project(':extra')
}
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!