【发布时间】:2014-04-29 12:43:40
【问题描述】:
我对旧版本的库 testX 有传递编译依赖。库 testX 不应该是编译依赖,而是 testCompile 依赖。更重要的是,我想依赖 testX 的新版本,而不是旧版本。
我有一个部分解决方案,它设置了正确的库版本,但它通过覆盖编译依赖项来工作。但是我在编译时留下了不需要的 textX。
compile group: 'x', name: 'testX', version 'new'
我尝试从编译中排除库 testX 并添加显式 testCompile 依赖项,但排除也会从 testCompile 中删除依赖项。
testCompile group: 'x', name: 'testX', version 'new'
configurations {
compile.exclude group: 'x', module: 'X'
}
【问题讨论】:
-
你解决了吗?我也面临同样的问题。
标签: gradle dependency-management