Reputation: 1981
I'd like to copy every jar generated from subprojects from their /bin/libs
dir to the root project's bin
dir. Unfortunately, my current code just copies everything from the subprojects into that directory:
task muleapp(type: Copy) {
from '.'
include '**/bin/libs/*.jar'
into 'bin'
}
How can I achieve the desired functionality?
Upvotes: 1
Views: 1805
Reputation: 2030
Try this type of task:
task muleapp(type: Copy) {
def jars=[]
subprojects.each {
jars+=it.libsDir
}
from jars
into 'bin'
}
Upvotes: 3