Add Shadow, jvm.args prop, coroutines, fix stdin

This commit is contained in:
JeremyStar™ 2024-12-27 23:51:57 +01:00
parent ee23d7739d
commit 407c601f88
Signed by: JeremyStarTM
GPG key ID: E366BAEF67E4704D
3 changed files with 14 additions and 0 deletions

View file

@ -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

View file

@ -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

View file

@ -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 }