You need to think about which task created the jar rather than the location of the jars. Perhaps
task syncJars(type: Sync) {
from tasks.withType(Jar)
...
}
You need to think about which task created the jar rather than the location of the jars. Perhaps
task syncJars(type: Sync) {
from tasks.withType(Jar)
...
}