I am trying to specify some jar dependencies using gradle and these instructions:
http://gradle.org/docs/current/userguide/dependency_management.html#sub:file_dependencies
I have the following project:
test
-> libs
-> svnant.jar
-> build.gradle
where build.gradle contains:
dependencies {
runtime files('libs/svnant.jar')
runtime fileTree(dir: 'libs', include: '*.jar')
}
when I run gradle from windows cmd I get:
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'.
what have I missed?
You only get a runtime
configuration if you apply the java
plugin (or declare the configuration on your own).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With