#!/usr/bin/env sh

./gradlew clean
./gradlew shadowJar

cp build/libs/api-all.jar .

rm -fr build/dist/ com.jaytux.simd.api.tar.gz
jpackage --type app-image --input build/libs/ --dest build/dist/ --name com.jaytux.simd.api \
         --main-jar ./api-all.jar --main-class com.jaytux.simd.MainKt

rm api-all.jar
tar -czf com.jaytux.simd.api.tar.gz -C build/dist com.jaytux.simd.api