]> nmode's Git Repositories - signal-cli/blobdiff - build.gradle.kts
Adapt code style
[signal-cli] / build.gradle.kts
index 5879660e09c2601bb8cc766e8390a1922f53fd2e..983e128b54bdddd190896724d5481a1a7be16344 100644 (file)
@@ -3,14 +3,20 @@ plugins {
     application
     eclipse
     `check-lib-versions`
-    id("org.graalvm.buildtools.native") version "0.9.28"
+    id("org.graalvm.buildtools.native") version "0.10.2"
 }
 
-version = "0.12.4"
+version = "0.13.6-SNAPSHOT"
 
 java {
-    sourceCompatibility = JavaVersion.VERSION_17
-    targetCompatibility = JavaVersion.VERSION_17
+    sourceCompatibility = JavaVersion.VERSION_21
+    targetCompatibility = JavaVersion.VERSION_21
+
+    if (!JavaVersion.current().isCompatibleWith(targetCompatibility)) {
+        toolchain {
+            languageVersion.set(JavaLanguageVersion.of(targetCompatibility.majorVersion))
+        }
+    }
 }
 
 application {
@@ -20,12 +26,15 @@ application {
 graalvmNative {
     binaries {
         this["main"].run {
+            buildArgs.add("--install-exit-handlers")
+            buildArgs.add("-Dfile.encoding=UTF-8")
+            buildArgs.add("-J-Dfile.encoding=UTF-8")
             resources.autodetect()
             configurationFileDirectories.from(file("graalvm-config-dir"))
             if (System.getenv("GRAALVM_HOME") == null) {
                 toolchainDetection.set(true)
                 javaLauncher.set(javaToolchains.launcherFor {
-                    languageVersion.set(JavaLanguageVersion.of(17))
+                    languageVersion.set(JavaLanguageVersion.of(21))
                 })
             } else {
                 toolchainDetection.set(false)