On Jul 20, 2009, at 1:17 PM, Russel Winder wrote:
On Mon, 2009-07-20 at 12:45 +0200, Hans Dockter wrote:
[ . . . ]
One bracket needs to be at a different place and the as clause is not
needed:
files ( new File ( coberturaHome , 'jar' ) .listFiles ( [ accept :
{ File dir , String name -> ( name =~ '\\.jar$' ).find ( ) } ] as
FilenameFilter ))
Thanks for trying, but didn't work :-(
I now have :
classpath files ( new File ( coberturaHome , 'jar' ) ).listFiles
( [ accept : { File dir , String name -> ( name =~ '\\.jar$' ).find
( ) } ] as FilenameFilter )
and it gives me the same error as before.
You can't access variables from outside the buildscript context. After
all the buildscript context is evaluated _before_ the rest of the
script is evaluated. So you would need to define coberturaHome within
the buildscript context.
- Hans
--
Hans Dockter
Gradle Project Manager
http://www.gradle.org
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email