我在 gradle docs 中读到
"Newest - used by default by Gradle - the newest version of the dependency is used.
This strategy has been in Gradle since early days."
然而,当我使用代码复制配置时,我看到不同版本的重复 jar
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 gradle 下载