Hi,
I am using gradle 1.4, and am trying to invoke a ‘compileGroovy’ task. My gradle.build file looks like this :
apply plugin: ‘groovy’ compileGroovy
{
source = fileTree(dir: ‘webapp/groovy’)
destinationDirectory = new File(‘webapp/WEB-INF/classes’)
}
On invoking , “gradle compileGroovy --debug”, I get the below Exception:
Caused by: org.gradle.api.InvalidUserDataException: ‘compileGroovy.groovyClasspath’ must not be empty. It is either configured automatically by the ‘groovy-base’ plugin, or can be set manually.
Now, the error is telling me to set the property , groovyClasspath. So, according to the docs (http://www.gradle.org/docs/current/dsl/org.gradle.api.tasks.compile.GroovyCompile.html#org.gradle.api.tasks.compile.GroovyCompile:groovyClasspath), ‘groovyClasspath’ is a ‘org.gradle.api.file.FileCollection’, which can be instantiated by using ‘Project.files(java.lang.Object…)’. But, I am unable to use the ‘files’ method on ‘org.gradle.api.Project’.
Any pointers on what am I doing wrong ?
Thanks much
P.S : I am relatively a newbie in both Gradle and Groovy.