On 27/09/2011, at 8:33 PM, Carlton Brown wrote:

> One more question on the 'retrieve' code... I notice that the jars copied by 
> Gradle have revision numbers in the filename.   Is there a way to access just 
> the jar name without the revision number?   In Ivy this would be a simple 
> matter of specifying the right retrieval pattern to the retrieve task.


You'd do this at the level of files in Gradle, not at the Ivy level.

task doTestRetrieve(type: Copy) {
       from configurations.compile
       into "myDependencies"
       rename "(.+)-.+\\.(\w+)", '$1.$2'
       eachFile {
           println "retrieving dependency: $it.name"
       }
}

Or if regexes aren't your thing there are other ways to do the rename.

-- 
Luke Daley
Principal Engineer, Gradleware 
http://gradleware.com

Reply via email to