You may be encountering an issue we've run into. I'm not sure we 100% understand it, but it appears that when unzipping an archive that has read-only files in it gradle can struggle. Gradle attempts to check the zip against any files it has already unzipped in order to know if the unzipping task is up-to-date, and this process can blow up if the archive has read-only files.
Notice lines like this in your stacktrace:
org.gradle.api.internal.changedetection.CompositeUpToDateRule.create
Caused by: java.io.IOException: Failed to set file permissions 420 on file
Not quite a smoking gun, but a pretty strong implication. Our solution (hacky, I'll admit) 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)
}
You can put that in a do first to allow gradle to re-expand the archive while it checks the up-to-date status.