You can use one of the rename methods on the Copy task. For example:
task copyToLib(type: Copy) {
into "lib"
from configurations.dll
rename { it.substring(0, it.indexOf("-")) +
it.substring(it.lastIndexOf("."), it.size()) }
}
PS: Your post didn't make it through to the mailing list. Anyway, please use
the new forum instead (http://forums.gradle.org).
--
Peter Niederwieser
Principal Engineer, Gradleware
http://gradleware.com
Creator, Spock Framework
http://spockframework.org
Twitter: @pniederw
MJ wrote:
>
> Below task[1] copies the dependencies into lib like this[2]. But I want to
> copy artifcats without version number, only $artifact.name.dll like [3].
> Could anyone please guide..
>
> [1]
> task copyToLib (type:copy) {
> into "lib"
> from "configurations.dll"
> }
>
> [2]
> lib\
> xyz-1.0-SNAPSHOT.dll
> sync-1.0-RC1.dll
>
> [3]
> lib\
> xyz.dll
> sync.dll
>
--
View this message in context:
http://gradle.1045684.n5.nabble.com/How-to-copy-dependencies-without-version-numbers-tp4930158p4931455.html
Sent from the gradle-dev mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email