2022-02-27 23:38:55 +01:00
|
|
|
import com.github.jengelman.gradle.plugins.shadow.transformers.Log4j2PluginsCacheFileTransformer
|
|
|
|
|
2024-07-12 06:56:42 +02:00
|
|
|
plugins {
|
|
|
|
application
|
|
|
|
}
|
|
|
|
|
2022-02-27 23:38:55 +01:00
|
|
|
val terminalConsoleVersion = "1.2.0"
|
2022-07-02 18:50:16 +02:00
|
|
|
val jlineVersion = "3.21.0"
|
2022-02-27 23:38:55 +01:00
|
|
|
|
|
|
|
dependencies {
|
|
|
|
api(projects.core)
|
|
|
|
|
2022-09-26 17:43:17 +02:00
|
|
|
implementation(libs.terminalconsoleappender) {
|
2023-06-17 17:47:42 +02:00
|
|
|
exclude("org.apache.logging.log4j")
|
|
|
|
exclude("org.jline")
|
2022-02-27 23:38:55 +01:00
|
|
|
}
|
|
|
|
|
2022-09-26 17:43:17 +02:00
|
|
|
implementation(libs.bundles.jline)
|
2022-02-27 23:38:55 +01:00
|
|
|
|
2022-09-26 17:43:17 +02:00
|
|
|
implementation(libs.bundles.log4j)
|
2024-05-28 01:48:35 +02:00
|
|
|
|
|
|
|
implementation(libs.gson.runtime)
|
2022-02-27 23:38:55 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
application {
|
|
|
|
mainClass.set("org.geysermc.geyser.platform.standalone.GeyserStandaloneBootstrap")
|
|
|
|
}
|
|
|
|
|
2023-05-25 03:46:43 +02:00
|
|
|
tasks.named<Jar>("jar") {
|
|
|
|
manifest {
|
|
|
|
// log4j provides multi-release java 9 code which resolves https://github.com/GeyserMC/Geyser/issues/3693
|
|
|
|
attributes("Multi-Release" to true)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-02-27 23:38:55 +01:00
|
|
|
tasks.withType<com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar> {
|
2022-09-19 17:26:47 +02:00
|
|
|
archiveBaseName.set("Geyser-Standalone")
|
2022-02-27 23:38:55 +01:00
|
|
|
|
|
|
|
transform(Log4j2PluginsCacheFileTransformer())
|
2023-04-20 11:46:12 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
tasks.named<JavaExec>("run") {
|
|
|
|
val dir = projectDir.resolve("run")
|
|
|
|
dir.mkdirs()
|
|
|
|
jvmArgs("-Dio.netty.leakDetection.level=PARANOID")
|
|
|
|
workingDir = dir
|
|
|
|
}
|