我对 gradle 完全陌生。我将以下 build.gradle 放在一起,以了解如何从 flatDir 存储库中提取依赖项。“localrepo”目录包含两个文件“a.txt”和“b.txt”,仅此而已。当我运行“gradle dependencies”时,我遇到了失败:
:dependencies
------------------------------------------------------------
Root project
------------------------------------------------------------
copytest
+--- :a.txt: FAILED
\--- :b.txt: FAILED
BUILD SUCCESSFUL
Total time: 5.506 secs
为什么?
这是我的 build.gradle:
configurations {
copytest
}
repositories {
flatDir name: 'localRepository', dirs: 'localrepo'
}
dependencies {
copytest ':a.txt'
copytest ':b.txt'
}
task copyTask(type: Copy) {
from configurations.copytest
into 'result'
}