我希望Gradle通过添加通过第二个配置加载的依赖项的依赖项来计算配置的依赖项 .
两个Gradle项目的示例:
dependency/build.gradle
:
configurations {
other
}
dependencies {
other "bar:artifact1:0.4"
}
top/build.gradle
:
configurations {
other
modules
}
dependencies {
modules "foo:dependency:1.0"
other "bar:artifact2:0.1"
}
所以 top
项目依赖 dependency
通过 modules
配置,但我希望 top
中的 other
配置同时包含 "bar:artifact1:0.4"
和 "bar:artifact2:0.1"
.
在我的具体情况中, other
依赖项列在每个工件的Ivy文件中 . 我想收集项目所依赖的所有工件的 other
依赖项 .
这不是一个多项目构建,但是其他项目的工件是从远程存储库加载的 .
有没有办法配置Gradle包含所有传递依赖的配置?