After having downloaded a set of ZIP dependencies, I need to extract them to my root project folder. This is what I got:
configurations {
zipFiles
}
dependencies {
zipFiles(
'a.b.c:d@zip',
'e.f.g:h@zip'
)
}
task extractZip(type: Copy) {
configurations.zipFiles.each { File file ->
from zipTree(file)
into ''
doLast {
println "Extracting file '${file.getName()}' to '${extractFolder}'"
}
}
}
build.dependsOn(extractZip)
But this gets me this error:
* What went wrong:
Neither path nor baseDir may be null or empty string.
Indeed, this only happens when I choose the root dir as folder. May I ask why it is prohibited to copy files to that location?