考虑以下项目结构:
app
|_subprojA
| |_build.gradle
|_subprojB
| |_build.gradle
|_settings.gradle
设置.gradle
include 'subprojA'
include 'subprojB'
build.gradle (subprojA)
...
dependencies {
...
}
build.gradle (subprojB)
...
dependencies {
compile project(':subprojA')
}
运行./gradlew subprojA:uploadArchives
和./gradlew subprojB:uploadArchives
另一个项目,尝试导入任何 repo 中不可用的com.abc:subprojB:x.y.z
抱怨。subprojA
我想要什么:在我的本地,我希望 subprojB 指向本地 subprojA 以便于开发,但是在将 subprojB 发布到工件时,我希望它创建对com.abc:subprojA:x.y.z
.