I’m trying to write a custom Jar
task that can set entry comments and the type of compression that’s used on a per-entry basis. It looks like a custom CopyAction
could be a reasonable place to plug this in, but it’s internal API. Is there a way to do it that only uses public API or, failing that, could a public API be added that offers this level of control or allows something to be plugged in?
For the curious, the background to this request is a fairly significant rewrite of Spring Boot’s Gradle plugin to address several problems with the current version. We want to make the task that produces Spring Boot’s fat jar a custom Jar
task. For performance reasons, Spring Boot’s fat jars contain jar files that must be stored rather than deflated. They also uses comments on individual entries to indicate that they should be automatically extracted at runtime. This is to work around limitations in libraries that make assumptions that don’t hold true when run from a nested jar.