Actually what I really want is to be able to do:

compile.classpath += groovyLib.listFiles ( [ accept : { File dir , String name 
-> ( name =~ '.jar$' ).find ( ) } ] as FilenameFilter ) as List


On Tue, 2009-03-24 at 19:40 +0000, Russel Winder wrote:
> In ant you can create class paths with filesets which allows you not to
> have to specify the version number of a dependency.  Basically you are
> saying "just use all the jars in there".
> 
> The flat directory resolver is part way to doing this for dependencies
> in Gradle and yet you have to specify the version number.  Is there a
> way of getting Gradle to deduce the version number.  I tried:
> 
> dependencies {
>   addFlatDirResolver ( 'lib' , groovyHome.path + '/lib' )
>   groovy ( ':groovy:' )
>   testCompile ( ':junit:' )
> }
> 
> but Gradle didn't like that.  I even tried globs and stuff but nothing
> seemed to work, an explicit version number appears to be required.
> 
> Am I just missing the right example in the user guide?
> 
> 
-- 
Russel.
============================================================
Dr Russel Winder                 Partner

Concertant LLP          t: +44 20 7585 2200, +44 20 7193 9203
41 Buckmaster Road,     f: +44 8700 516 084    voip:  
sip:[email protected]
London SW11 1EN, UK.    m: +44 7770 465 077    xmpp: [email protected]

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to