What are the other ways?   I don't mind regex when necessary, and I know
that duplicating ivy is not the goal of this project, but it would really
make sense to have a more specialized abstraction for dealing with artifacts
than just treating them as undifferentiated files.

On Tue, Sep 27, 2011 at 4:34 PM, Luke Daley <[email protected]>wrote:

>
> 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