33 lines
920 B
Bash
Executable file
33 lines
920 B
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
set -xeo pipefail
|
|
|
|
if [ -z "$GRAALVM_HOME" ]; then
|
|
echo "Please set GRAALVM_HOME"
|
|
exit 1
|
|
fi
|
|
|
|
"$GRAALVM_HOME/bin/gu" install native-image || true
|
|
export PATH=$GRAALVM_HOME/bin:$PATH
|
|
|
|
JAR=target/pod-babashka-hsqldb-0.0.1-SNAPSHOT-standalone.jar
|
|
|
|
lein do clean, uberjar
|
|
|
|
$GRAALVM_HOME/bin/native-image \
|
|
-jar $JAR \
|
|
-H:Name=pod-babashka-hsqldb \
|
|
-H:+ReportExceptionStackTraces \
|
|
-J-Dclojure.spec.skip-macros=true \
|
|
-J-Dclojure.compiler.direct-linking=true \
|
|
"-H:IncludeResources=SCI_VERSION" \
|
|
-H:ReflectionConfigurationFiles=reflection.json \
|
|
--initialize-at-run-time=java.lang.Math\$RandomNumberGeneratorHolder \
|
|
--initialize-at-build-time \
|
|
-H:Log=registerResource: \
|
|
--verbose \
|
|
--no-fallback \
|
|
--no-server \
|
|
--report-unsupported-elements-at-runtime \
|
|
"-H:IncludeResources=org/hsqldb/.*\.properties" "-H:IncludeResources=org/hsqldb/.*\.sql" \
|
|
"-J-Xmx4500m"
|