You can add them to the compile task's unmanaged classpath:

compile.unmanagedClasspath << .. a collection of files ...

In Gradle 0.6 or 0.7, we want to provide a simple way to add a collection of files to a configuration, something like:

dependencies {
   compile files(... a collection of files ...)
}


Russel Winder wrote:
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?



---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email


Reply via email to