我正在尝试使用 gradle 和这些说明指定一些 jar 依赖项:
http://gradle.org/docs/current/userguide/dependency_management.html#sub:file_dependencies
我有以下项目:
test
-> libs
-> svnant.jar
-> build.gradle
其中 build.gradle 包含:
dependencies {
runtime files('libs/svnant.jar')
runtime fileTree(dir: 'libs', include: '*.jar')
}
当我从 windows cmd 运行 gradle 时,我得到:
FAILURE: Build failed with an exception.
* Where:
Build file 'C:\...\test\build.gradle' line: 16
* What went wrong:
A problem occurred evaluating root project 'test'.
> Could not find method runtime() for arguments [file collection] on root project 'test'.
我错过了什么?