You may have encountered a problem that we have encountered. I'm not sure that we understand this 100%, but it seems that when unpacking an archive that contains read-only files, gradle may work. gradle tries to check the zip for any files that it has already unpacked to find out if the unpacking task is updated, and this process may explode if there are read-only files in the archive.
Pay attention to lines like this in your stack:
org.gradle.api.internal.changedetection.CompositeUpToDateRule.create Caused by: java.io.IOException: Failed to set file permissions 420 on file
Not quite a smoking weapon, but a pretty strong impression. Our solution (hacking, I agree) was to use the following code:
def fixExpandedArchivesForLinux() { // This interesting hackery fixes the expandedArchives directory // to avoid the read-only extracted ZIP file contents issue. def dir = new File(buildDir, "tmp/expandedArchives") FilePermissions.chmodRecursively(dir, 0200) }
This can be done first to allow gradle to redeploy the archive when checking for current status.
source share