-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Generate an executable via GraalVM ⚡
Install GraalVM (https://www.graalvm.org/) via SDKMAN! (https://sdkman.io/). GraalVM is used to build a native image (executable) from the fat JAR. Note: 'libsunec' native library (Sun Elliptic Curve crypto) needs to be in java.library.path, it is copied in current directory).
- Loading branch information
Showing
4 changed files
with
43 additions
and
0 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/bin/bash | ||
|
||
# Fail on error | ||
set -e | ||
|
||
echo "Build nicokosi/pullpitoK JAR file:" | ||
./gradlew shadowJar | ||
|
||
echo "Install GraalVM via SDKMAN!:" | ||
curl -s "https://get.sdkman.io" | bash || echo 'SDKMAN! already installed' | ||
source "$HOME/.sdkman/bin/sdkman-init.sh" | ||
GRAALVM_VERSION=1.0.0-rc-15-grl | ||
sdk install java $GRAALVM_VERSION | ||
sdk use java $GRAALVM_VERSION | ||
|
||
echo "Copy 'libsunec' shared library (Sun Elliptic Curve crypto):" | ||
cp $JAVA_HOME/jre/lib/libsunec* . | ||
|
||
echo "Build nicokosi/pullpitoK's executable from JAR via GraalVM:" | ||
native-image \ | ||
--no-server \ | ||
--verbose \ | ||
--enable-https \ | ||
-jar ./build/libs/pullpitoK-all.jar \ | ||
pullpitoK && \ | ||
echo ' => Check the executable: ' && ./pullpitoK | ||
|
||
echo "Executable has been generated, try it copy/pasting this command:" | ||
echo " GRAALVM_HOME=$GRAALVM_HOME ./pullpitoK python/peps" |
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