Created
November 15, 2024 05:38
-
-
Save vinaysshenoy/398ae93a2f85588dae5b96bb17e8c641 to your computer and use it in GitHub Desktop.
Bundle minimal JRE with application
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
./gradlew -version | |
./gradlew shadowJar --no-daemon | |
jdkModules=$(jdeps --print-module-deps --ignore-missing-deps ./build/libs/application.jar) | |
echo "Building JRE with modules: $jdkModules" | |
rm -rf ./build/libs/jre | |
jlink --compress zip-6 --strip-debug --no-header-files --no-man-pages --output ./build/libs/jre --add-modules "$jdkModules" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment