GradleUp / shadow

Gradle plugin to create fat/uber JARs, apply file transforms, and relocate packages for applications and libraries. Gradle version of Maven's Shade plugin.
https://www.gradleup.com/shadow/
Apache License 2.0
3.7k stars 390 forks source link

Feature request: Option to add minimized bundled JRE in the resulting shadow jar #748

Closed chjan closed 1 year ago

chjan commented 2 years ago

Please check the User Guide before submitting "how do I do 'x'?" questions!

Shadow Version

Gradle Version

Expected Behavior

Actual Behavior

Gradle Build Script(s)

Content of Shadow JAR (jar tf <jar file> - post link to GIST if too long)

Would this at all be possible to do? Or if not included in this plugin, how to prepare that JRE using another approach. One could then use the Launch4j and then NSIS gradle plugins which are both easy to use. This compares to jpackage which I perceive as much more cryptic. For example, no tutorials explains how use jpackage to add DLL and other non-java files.

johnrengelman commented 1 year ago

Thanks for the request! However, creating "executable jars" by bundling the JRE has been asked a number of times in issues and I am not interested in expanding Shadow to do this. I have pretty little time to maintain this plugin, so I'm keeping it narrow in scope. The shadow plugin has an API that allows other plugins/libraries to extend it. If someone wanted to build this capability as another plugin, I would consider PRs that add any needed APIs to make that happen (if they don't exist).