From 407c601f88706ef9f743255a9377225b2d235799 Mon Sep 17 00:00:00 2001 From: JeremyStarTM Date: Fri, 27 Dec 2024 23:51:57 +0100 Subject: [PATCH] Add Shadow, jvm.args prop, coroutines, fix stdin --- build.gradle.kts | 1 + gradle.properties | 2 ++ testapp/build.gradle.kts | 11 +++++++++++ 3 files changed, 14 insertions(+) diff --git a/build.gradle.kts b/build.gradle.kts index 09c810f..331df3e 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -154,6 +154,7 @@ allprojects { dependencies { // Kotlin support implementation("${property("dependencyKotlin_ReflectIdentifier") as String}:${property("dependencyKotlinVersion") as String}") + implementation("${property("dependencyKotlin_CoroutinesIdentifier") as String}:${property("dependencyKotlin_CoroutinesVersion") as String}") implementation("${property("dependencyKotlin_DateTimeIdentifier") as String}:${property("dependencyKotlin_DateTimeVersion") as String}") // Unit testing diff --git a/gradle.properties b/gradle.properties index 0f3bb99..d140672 100644 --- a/gradle.properties +++ b/gradle.properties @@ -53,6 +53,8 @@ languageKotlin=2.0 # Dependencies dependencyKotlinVersion=2.0.21 dependencyKotlin_ReflectIdentifier=org.jetbrains.kotlin:kotlin-reflect +dependencyKotlin_CoroutinesIdentifier=org.jetbrains.kotlinx:kotlinx-coroutines-core +dependencyKotlin_CoroutinesVersion=1.10.1 dependencyKotlin_DateTimeIdentifier=org.jetbrains.kotlinx:kotlinx-datetime dependencyKotlin_DateTimeVersion=0.6.1 dependencyOshiIdentifier=com.github.oshi:oshi-core-java11 diff --git a/testapp/build.gradle.kts b/testapp/build.gradle.kts index a4e3b33..90be08c 100644 --- a/testapp/build.gradle.kts +++ b/testapp/build.gradle.kts @@ -21,6 +21,7 @@ plugins { id("application") id("org.mikeneck.graalvm-native-image") version("v1.4.0") + id("com.gradleup.shadow") version ("8.3.5") } // Dependencies @@ -72,11 +73,21 @@ application { "g1" -> add("-XX:+UseG1GC") } + // -> Manually added settings + if (hasProperty("jvm.args")) + addAll((property("jvm.args") as String).split(" ")) + + // Jansi add("-Djansi.mode=force") } } +// Fix stdin +tasks.withType(JavaExec::class) { + standardInput = System.`in` +} + // GraalVM native-image nativeImage { outputs.upToDateWhen { true }