kezong / fat-aar-android

A gradle plugin that merge dependencies into the final aar file works with AGP 3.+
MIT License
3.08k stars 607 forks source link

Fix "Could not copy zip entry … Permission Denied" errors #394

Open ngsilverman opened 1 year ago

ngsilverman commented 1 year ago

On systems where unzipping an archive restores the file permissions, if the original file permissions are too restrictive, the copy task fails.

For example:

Execution failed for task ':module:mergeClassesRelease'.
> Could not copy zip entry …/module/build/intermediates/exploded-aar/androidx.benchmark/benchmark-macro-junit4/1.1.0-rc02/release/classes.jar!META-INF/androidx.benchmark_benchmark-macro-junit4.version to '…/module/build/intermediates/fat-aar/merge_classes/release/META-INF/androidx.benchmark_benchmark-macro-junit4.version'.
   > …/module/build/intermediates/fat-aar/merge_classes/release/META-INF/androidx.benchmark_benchmark-macro-junit4.version (Permission denied)
hmphu commented 9 months ago

@kezong I got same error "Permission Denied" and this PR seem fixed that. Could you please review and merge the PR and release a new version?