that ensures that the resolved dependencies are not only copied into the artifact cache but at the same time into the project folder specified over the attribute ‘pattern’ of the retrieve task.
All that complication is just to copy with the appropriate naming convention. If you just want the files with [artifact]-[revision].[ext] then it’s very simple.
task libs(type: Sync) {
from configurations.compile
into "libs"
}
I use gradle for building subprojects. I need to copy all resolved runtime jar files into a special folder. How to do that? (That includes runtime and compile dependencies. We use the java and war plugin).
When I use the last pasted code in the allprojects block, then I also get all providedCompile dependencies with their transitiv dependencies. But that is not what I need. Because the provided compile dependencies are already on the webapplication.