Created
August 1, 2012 07:59
-
-
Save purplefox/3224773 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
test { | |
classpath 'build/classes/main' | |
systemProperty 'vertx.test.timeout', 15 | |
systemProperty 'vertx.mods', "$projectDir/build/tmp/mod-test" | |
systemProperty 'vertx.version', "$project.version" | |
testLogging.showStandardStreams = true | |
} | |
Gives error: | |
* What went wrong: | |
A problem occurred evaluating root project 'mod-redis'. | |
> Could not find method classpath() for arguments [build/classes/main] on root project 'mod-redis'. | |
In the docs it says classpath is a 'FileCollection' but doesn't tell me how to represent that textually in a task, nor give any examples. |
Peter - If I change it to your suggestion I get the following error:
A problem occurred evaluating root project 'mod-redis'.
Cannot cast object '/home/tim/projects/vert-x/mod-redis/build/classes/main' with class 'java.io.File' to class 'org.gradle.api.file.FileCollection'
You should be able to use one of the following to set the classpath property:
classpath = files('build/classes/main')
setClasspath(files('build/classes/main'))
setClasspath files('build/classes/main')
The classpath should default to the runtime classpath and perhaps you only need to add the testClassesDir in your particular case:
testClassesDir = file('build/classes/main');
Thanks, Peter already suggested that, but it doesn't work (see above)
Are you sure you have the 's'? files()
returns a FileCollection
, file()
returns a File
.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Properties are configured using
propertyName = value
.FileCollection
s can be created using thefiles()
method (amongst others).And for documentation on file collections, you can always check the user guide.