shadow
shadow copied to clipboard
Zip entry actions
A more general implementation of #246 , motivated by the same desire to have shadow jars that play nice with rsync. This implementation pushes a list of Action<ZipEntry> into the ZipOutputStream code so that all processed ZipEntrys can be run against them.
Arbitrary actions can be written in the build.gradle:
shadowJar{
modifyZipEntries { ze ->
println ze.hashCode()
ze.setName("mutatedName")
// ...
}
}
And the motivating action has a sugared form:
shadowJar{
zeroZipEntryTimestamps()
}
I'm a coworker of the requester for #246 , and lifted some of his comments and test code.
This work will go into a 2.1.0 build since it's adding new public API.
I believe this is outdated, and we shouldn't apply actions for Zip entries.