我在gradle文档中读到
"Newest - used by default by Gradle - the newest version of the dependency is used.
This strategy has been in Gradle since early days."
然而,当我使用代码复制配置时,我看到了不同版本的重复罐子
task('copyJars') {
//ext.collection = files { genLibDir.listFiles() }
//delete ext.collection
copy { from configurations.compile into genLibDir }
//copy { from fixedLibDir into genLibDir }
}
这是其中一个。。
snakeyaml-1.6.jar
snakeyaml-1.7.jar
这是最新的1.1级下载
冲突解决仅适用于Maven或Ivy存储库中具有必要元数据(pom.xml或Ivy.xml)的依赖项。
IT在使用"最新"版本的jar时似乎不支持此版本。。。
compile fileTree(dir: project.ext.fixedLibDir, include: '*.jar')
所以你必须自己手动完成:(.