Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Remove empty dirs #54

Merged
merged 4 commits into from
Feb 28, 2024
Merged

Conversation

patrick-premont
Copy link
Contributor

Fixes #50

  • Now removes empty directories by calling copyZipWithoutEmptyDirectories in Zip.scala, mirroring the behavior of StandaloneJarProcessor.java
  • Reimplemented copyZipWithoutEmptyDirectories to remove nested empty directories, and added a test for it.
  • Updated SHA of shading tests of bytebuddy. A before and after diff of unzip -l shows no change in any file paths, timestamps and sizes, except for the two empty directories that get removed as expected:
    7a8,9
    >         0  01-03-1980 00:00   net/
    >         0  01-03-1980 00:00   net/bytebuddy/
    93c95
    <    733298                     88 files
    ---
    >    733298                     90 files

…ries in Zip.scala, mirroring the behavior of StandaloneJarProcessor.java

- Reimplemented copyZipWithoutEmptyDirectories to remove nested empty directories, and added a test for it.
- Update SHA of shading tests of bytebuddy. A before and after diff of unzip -l shows no change in any file paths, timestamps and sizes, except for the two empty directories that get removed as expected:

7a8,9
>         0  01-03-1980 00:00   net/
>         0  01-03-1980 00:00   net/bytebuddy/
93c95
<    733298                     88 files
---
>    733298                     90 files
…kes SHAs for shading tests consistent across JDK versions 8, 11 and 21.
@eed3si9n eed3si9n merged commit 519cc62 into eed3si9n:develop Feb 28, 2024
4 checks passed
@patrick-premont patrick-premont deleted the remove-empty-dirs branch April 8, 2024 13:18
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Empty "directories" remain in output jar after using zap
2 participants