-
Notifications
You must be signed in to change notification settings - Fork 1
Build from Source
wiki de pasquale edited this page Aug 22, 2022
·
2 revisions
-
Install GraalVM
- GraalVM is a substitution for JDK, you don't generally need another one, if you don't depend on specific functionality or performance of another JDK
- Simplest way is to use brew cask as described here otherwise use static installation available for download here
- Follow the installation closely, you will need to link
bin
folder to path and fix permissions on macOS
-
Install Native Image
- You will use
gu
to installnative-image
, tutorial here
- You will use
-
Checkout the project
- Use your favorite tool to download this project
- Unzip (if applicable) and
cd
to the directory
-
Build runnable Jar
./gradlew shadowJar
- This step builds the utility and prepares jar files for following step
-
Build Native Image
native-image --no-fallback -cp dragapult.app.MainKt -jar dragapult-app/build/libs/dragapult-app.jar dragapult
- It optimizes code, injects runtime dependencies and wraps the utility with self executable binary. Please note that it will only build a binary that's applicable on your local machine. If you need to run it on some other system, use a host system to build it for you. Otherwise Matrix build on Github Actions works too.
-
Done!
- You should see a
dragapult
binary ready to use in root directory of your project.
- You should see a