feat: move build cmds to script, generate custom jre
This commit is contained in:
parent
ddd20b84ab
commit
09cfbc3221
2 changed files with 44 additions and 16 deletions
30
build.sh
Normal file
30
build.sh
Normal file
|
@ -0,0 +1,30 @@
|
|||
#!/usr/bin/sh -eu
|
||||
|
||||
export PATH="$PWD/jdk/bin:$PATH"
|
||||
export JAVA_HOME="$PWD/jdk"
|
||||
|
||||
# check if JDK works
|
||||
java --version
|
||||
|
||||
# build TESLauncher
|
||||
cd src
|
||||
./gradlew shadowJar
|
||||
cd ..
|
||||
|
||||
# install built JAR named TESLauncher-x.y.z.jar
|
||||
find src/build/libs/ -name "TESL*.jar" -type f -exec \
|
||||
install -D -m 644 {} /app/tesl.jar \;
|
||||
#
|
||||
|
||||
# generate JRE with all modules enabled
|
||||
jlink \
|
||||
--strip-debug --no-man-pages --no-header-files --compress=2 \
|
||||
--add-modules ALL-MODULE-PATH --output jre
|
||||
#
|
||||
|
||||
# check if JRE works
|
||||
./jre/bin/java --version
|
||||
|
||||
# install JRE
|
||||
mkdir -p /app/lib/jvm/openj9
|
||||
cp -r ./jre/* /app/lib/jvm/openj9
|
Loading…
Add table
Add a link
Reference in a new issue