首先,有三个 module,分别是 app, base, moduleViews.
其中 base 中有一个 aar,moduleViews 也有一个 aar。
在每个 module 中除了放以下
android{
...
repositories {
flatDir{
dirs 'libs'
}
}
dependencies{
...
compile (name:'****',ext:'aar')
}
}
在工程目录下的 gradle 配置
allprojects {
repositories {
google()
jcenter()
flatDir {
dirs project(':base').file('libs')
dirs project(':moduleViews').file('libs')
}
}
}