Add GraalVM native image

This commit is contained in:
Hubert Van De Walle 2021-04-01 23:48:31 +02:00
parent 2bd6362268
commit 7a7ebe724e
5 changed files with 21 additions and 3 deletions

View File

@ -9,6 +9,14 @@ cd app/build/install/app-shadow
Move the executable somewhere in your $PATH
Or build a native image with GraalVM
```bash
./gradlew installShadowDist
cd app/build/install/app-shadow/lib
native-image --no-fallback -R:MaxNewSize=32 -jar scaffold.jar
```
## Usage
### Create a generator

View File

@ -0,0 +1,5 @@
[
{
"name":"com.electronwill.nightconfig.toml.TomlFormat"
}
]

View File

@ -0,0 +1,5 @@
{
"resources":{
"includes":[{"pattern":"\\QMETA-INF/services/org.slf4j.spi.SLF4JServiceProvider\\E"}]},
"bundles":[]
}

View File

@ -12,8 +12,8 @@ repositories {
}
java {
targetCompatibility = JavaVersion.toVersion(15)
sourceCompatibility = JavaVersion.toVersion(15)
targetCompatibility = JavaVersion.toVersion(11)
sourceCompatibility = JavaVersion.toVersion(11)
}
tasks.withType<JavaCompile> {

View File

@ -17,7 +17,7 @@ tasks.withType<Test> {
tasks.withType<KotlinCompile> {
kotlinOptions {
jvmTarget = "15"
jvmTarget = "11"
javaParameters = true
freeCompilerArgs = listOf("-Xopt-in=kotlin.RequiresOptIn")
}