Team,
I have a configuration like below in root project’s build.gradle
allprojects {
configurations {
client
}
}
And in each project there will be dependencies block like below
dependencies {
client 'group:artifact:version'
client 'group:artifact2:version'
client 'group:artifact3:version'
}
In the copy task of rootProject, I have below lines.
CopySpec clientLibsCopySpec = copySpec {
into 'release'
into('client-libs') {from configurations.client}
}
This does not copy any dependency jars to the lib
directory.
I m ok to slightly alter the above usage like below
CopySpec clientLibsCopySpec = copySpec {
into 'release'
allprojects.each {proj ->
into('client-libs') {from proj.configurations.client}
}
}
But, It does not pickup the latest version of the the dependencies across projects if there are some duplicate library entries with different versions…
The objective here is to copy some specific dependencies to client-libs
directory.
Hope the issue is clear
Kindly advice how to do it in gradle version 6.1