2
0
Fork 0
mirror of https://github.com/ethauvin/rife2-hello.git synced 2025-04-25 15:37:10 -07:00

Use the official GraalVM plugin

This commit is contained in:
Cedric Champeau 2023-03-05 16:23:48 +01:00
parent 5ca1fa305b
commit a79e616d79
No known key found for this signature in database
GPG key ID: 825C06C827AF6B66
4 changed files with 26 additions and 8 deletions

View file

@ -92,18 +92,23 @@ GraalVM supports creating a single Ahead-Of-Time
[native executable](https://www.graalvm.org/native-image/) from your java
bytecode.
Once you have at least GraalVM 22.3.1 Java 19 installed, you can generate the
UberJar as above, then create your native binary as such:
Once you have at least GraalVM 22.3.1 Java 17 installed, you can generate the native binary with:
```bash
native-image --no-fallback --enable-preview -jar app/build/libs/hello-uber-1.0.jar
./gradlew nativeCompile
```
You'll end up with a `hello-uber-1.0` file that can be executed directly without
You'll end up with a `hello-1.0` file that can be executed directly without
the need of a JVM:
```bash
./hello-uber-1.0
./app/build/native/nativeCompile/hello-1.0
```
Alternatively, you can run the native executable directly with:
```bash
./gradlew nativeRun
```
> **NOTE:** RIFE2 support for GraalVM native-image is still in preliminary