X-Git-Url: https://git.nmode.ca/signal-cli/blobdiff_plain/e0ed651e53eff382f3f7561e8c8ef0a1d87a46e9..4feba68afd1be83a61bacb83e4432ecad3200d77:/build.gradle.kts diff --git a/build.gradle.kts b/build.gradle.kts index e5de61d1..e491dd7d 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -3,14 +3,23 @@ plugins { application eclipse `check-lib-versions` - id("org.graalvm.buildtools.native") version "0.9.21" + id("org.graalvm.buildtools.native") version "0.10.5" } -version = "0.11.9" +allprojects { + group = "org.asamk" + version = "0.13.14-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 +29,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) @@ -42,7 +54,7 @@ dependencies { implementation(libs.slf4j.api) implementation(libs.slf4j.jul) implementation(libs.logback) - implementation(project(":lib")) + implementation(project(":libsignal-cli")) } configurations { @@ -71,7 +83,7 @@ tasks.withType { } } -task("fatJar", type = Jar::class) { +tasks.register("fatJar", type = Jar::class) { archiveBaseName.set("${project.name}-fat") exclude( "META-INF/*.SF",