On Wed, Mar 10, 2010 at 3:34 PM, BungleFeet <[email protected]> wrote:
>
> Hello,
>
> I had expected to be able to use GDK methods in my gradle build scripts,
> e.g.
>
> new File('.').traverse(type:FileType.FILES, nameFilter:~/.*\.(?i:html?)$/){
> file -> /* do something */ }
>
> However, when running a build script (using gradle 0.8) containing a line
> like the above, I get a "No signature of method:
> java.io.File.traverse()..."
> exception.
You can use all GDK methods available from the Groovy shipped with Gradle.
The traverse method was added to the Groovy JDK with Groovy 1.7. But Gradle
0.8 uses Groovy 1.6.
Gradle 0.9 uses Groovy 1.7. It is not released yet but the snapshot are of
high quality and are ready to be used.
- Hans
--
Hans Dockter
Founder, Gradle
http://www.gradle.org, http://twitter.com/gradleorg
CEO, Gradle Inc. - Gradle Training, Support, Consulting
http://www.gradle.biz
> To double-check on the available methods, I ran a gradle build
> script containing
>
> File.metaClass.methods.each { println it.name }
>
> and got:
>
> equals
> getClass
> hashCode
> notify
> notifyAll
> .
> .
> .
> setWritable
> setWritable
> toString
> toURI
> toURL
>
> These are just the regular java.io.File methods. Why don't I have access
> to
> the extended GDK file class?
>
> Cheers,
>
> Bungle
> --
> View this message in context:
> http://old.nabble.com/Using-GDK-methods-within-gradle-build-scripts-tp27850505p27850505.html
> Sent from the gradle-user mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
> http://xircles.codehaus.org/manage_email
>
>
>