我正在尝试使用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'.
我错过了什么?
答案 0 :(得分:10)
如果您应用runtime
插件(或自行声明配置),则只能获得java
配置。