From 6723f5498616da919762c68978e13c518943ef40 Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Mon, 8 Jul 2024 22:28:52 +0100 Subject: [PATCH] Stick to Jansi for now --- ...ConsoleAppender-for-console-improvements.patch | 15 ++++++++++----- ...lugin-prefixes-using-Log4J-configuration.patch | 6 +++--- ...ender-to-keep-logging-IO-off-main-thread.patch | 4 ++-- ...stacktraces-in-log-messages-crash-report.patch | 4 ++-- patches/server/0020-Plugin-remapping.patch | 6 +++--- ...lection-calls-in-plugins-using-internals.patch | 4 ++-- .../0034-Expose-server-build-information.patch | 4 ++-- patches/server/0356-Implement-Mob-Goal-API.patch | 4 ++-- .../0706-Add-support-for-Proxy-Protocol.patch | 4 ++-- ...-Velocity-compression-and-cipher-natives.patch | 4 ++-- 10 files changed, 30 insertions(+), 25 deletions(-) diff --git a/patches/server/0011-Use-TerminalConsoleAppender-for-console-improvements.patch b/patches/server/0011-Use-TerminalConsoleAppender-for-console-improvements.patch index 2d91782dbb..97e1f14851 100644 --- a/patches/server/0011-Use-TerminalConsoleAppender-for-console-improvements.patch +++ b/patches/server/0011-Use-TerminalConsoleAppender-for-console-improvements.patch @@ -25,10 +25,10 @@ Other changes: Co-Authored-By: Emilia Kond diff --git a/build.gradle.kts b/build.gradle.kts -index 94dfc105b197c9eda481cbe90bb48b71c845e702..86d62bc710d8794adebb60c82d82406a9cf54cb5 100644 +index 94dfc105b197c9eda481cbe90bb48b71c845e702..e5a897eaea50252b92fba674daf5d43c9c11d196 100644 --- a/build.gradle.kts +++ b/build.gradle.kts -@@ -5,9 +5,30 @@ plugins { +@@ -5,9 +5,35 @@ plugins { `maven-publish` } @@ -42,8 +42,13 @@ index 94dfc105b197c9eda481cbe90bb48b71c845e702..86d62bc710d8794adebb60c82d82406a implementation(project(":paper-api")) - implementation("jline:jline:2.12.1") + // Paper start -+ //implementation("org.jline:jline-terminal-ffm:3.26.1") TODO: Investigate if this is broken with java 21 -+ implementation("org.jline:jline-terminal-jni:3.26.1") ++ // TODO: Look into these ++ //implementation("org.jline:jline-terminal-ffm:3.26.1") // Investigate if this is broken with java 21 ++ //implementation("org.jline:jline-terminal-jni:3.26.1") // check behavior of this in windows... ++ implementation("org.jline:jline-terminal-jansi:3.21.0") { ++ exclude("org.fusesource.jansi", "jansi") // J21 already bundles and even sometimes installs its own jansi ++ } ++ + implementation("net.minecrell:terminalconsoleappender:1.3.0") + implementation("net.kyori:adventure-text-serializer-ansi:4.17.0") // Keep in sync with adventureVersion from Paper-API build file + /* @@ -60,7 +65,7 @@ index 94dfc105b197c9eda481cbe90bb48b71c845e702..86d62bc710d8794adebb60c82d82406a implementation("org.apache.logging.log4j:log4j-iostreams:2.22.1") // Paper - remove exclusion implementation("org.ow2.asm:asm-commons:9.7") implementation("org.spongepowered:configurate-yaml:4.2.0-SNAPSHOT") // Paper - config files -@@ -78,6 +99,19 @@ tasks.check { +@@ -78,6 +104,19 @@ tasks.check { dependsOn(scanJar) } // Paper end diff --git a/patches/server/0012-Handle-plugin-prefixes-using-Log4J-configuration.patch b/patches/server/0012-Handle-plugin-prefixes-using-Log4J-configuration.patch index 7b2e11f097..1dc5881569 100644 --- a/patches/server/0012-Handle-plugin-prefixes-using-Log4J-configuration.patch +++ b/patches/server/0012-Handle-plugin-prefixes-using-Log4J-configuration.patch @@ -15,10 +15,10 @@ This may cause additional prefixes to be disabled for plugins bypassing the plugin logger. diff --git a/build.gradle.kts b/build.gradle.kts -index 129d29deb929b3a26913a5a1bf9e9d6633884189..feaa89c8b653daadc1fc1d6054ba2b040e58f650 100644 +index e5a897eaea50252b92fba674daf5d43c9c11d196..7d2d248c059ffefb1b4430bba9df41da50a108c0 100644 --- a/build.gradle.kts +++ b/build.gradle.kts -@@ -24,7 +24,7 @@ dependencies { +@@ -29,7 +29,7 @@ dependencies { all its classes to check if they are plugins. Scanning takes about 1-2 seconds so adding this speeds up the server start. */ @@ -28,7 +28,7 @@ index 129d29deb929b3a26913a5a1bf9e9d6633884189..feaa89c8b653daadc1fc1d6054ba2b04 runtimeOnly(log4jPlugins.output) alsoShade(log4jPlugins.output) diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java -index 60e354fe1d32cd315ed42cea4484c83c4b5e7e25..899e85ea70edfb6553dc27462690da8caa793f77 100644 +index fbbc08c5a189b99f8047e0f0f5cd31101149dbec..b717c9d8b6edc2cafc9281140913b7bdb6108cf0 100644 --- a/src/main/java/org/spigotmc/SpigotConfig.java +++ b/src/main/java/org/spigotmc/SpigotConfig.java @@ -288,7 +288,7 @@ public class SpigotConfig diff --git a/patches/server/0014-Use-AsyncAppender-to-keep-logging-IO-off-main-thread.patch b/patches/server/0014-Use-AsyncAppender-to-keep-logging-IO-off-main-thread.patch index 7cffdc089e..034da396b8 100644 --- a/patches/server/0014-Use-AsyncAppender-to-keep-logging-IO-off-main-thread.patch +++ b/patches/server/0014-Use-AsyncAppender-to-keep-logging-IO-off-main-thread.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Use AsyncAppender to keep logging IO off main thread diff --git a/build.gradle.kts b/build.gradle.kts -index 5e9d25728d12e3631fbecdea9545ba6c752cfcf6..fdfad742a97d7c6357e1de0192feeb906e15ffdc 100644 +index 7d2d248c059ffefb1b4430bba9df41da50a108c0..9f8744781ce4084b9ddb916e91656c1f5e155b8e 100644 --- a/build.gradle.kts +++ b/build.gradle.kts -@@ -35,6 +35,7 @@ dependencies { +@@ -40,6 +40,7 @@ dependencies { implementation("commons-lang:commons-lang:2.6") runtimeOnly("org.xerial:sqlite-jdbc:3.46.0.0") runtimeOnly("com.mysql:mysql-connector-j:8.4.0") diff --git a/patches/server/0015-Deobfuscate-stacktraces-in-log-messages-crash-report.patch b/patches/server/0015-Deobfuscate-stacktraces-in-log-messages-crash-report.patch index 160b1bd06f..3fed7813ed 100644 --- a/patches/server/0015-Deobfuscate-stacktraces-in-log-messages-crash-report.patch +++ b/patches/server/0015-Deobfuscate-stacktraces-in-log-messages-crash-report.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Deobfuscate stacktraces in log messages, crash reports, and diff --git a/build.gradle.kts b/build.gradle.kts -index fdfad742a97d7c6357e1de0192feeb906e15ffdc..7d3db5e39f33b73b852141c8b24c017e1b55ffb1 100644 +index 9f8744781ce4084b9ddb916e91656c1f5e155b8e..b9f82d5a13419dd823145283ea8a8fc24e724a4d 100644 --- a/build.gradle.kts +++ b/build.gradle.kts -@@ -46,6 +46,7 @@ dependencies { +@@ -51,6 +51,7 @@ dependencies { testImplementation("org.mockito:mockito-core:5.11.0") testImplementation("org.ow2.asm:asm-tree:9.7") testImplementation("org.junit-pioneer:junit-pioneer:2.2.0") // Paper - CartesianTest diff --git a/patches/server/0020-Plugin-remapping.patch b/patches/server/0020-Plugin-remapping.patch index 95a4bd3de0..2d615656bb 100644 --- a/patches/server/0020-Plugin-remapping.patch +++ b/patches/server/0020-Plugin-remapping.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Plugin remapping Co-authored-by: Nassim Jahnke diff --git a/build.gradle.kts b/build.gradle.kts -index 7d3db5e39f33b73b852141c8b24c017e1b55ffb1..2369b767cadcca95ba69f8b01b9cd90a9e254dc8 100644 +index b9f82d5a13419dd823145283ea8a8fc24e724a4d..c972a9b1a632f9e6a0873fe7d363c3b3c9e5f5fe 100644 --- a/build.gradle.kts +++ b/build.gradle.kts -@@ -47,6 +47,7 @@ dependencies { +@@ -52,6 +52,7 @@ dependencies { testImplementation("org.ow2.asm:asm-tree:9.7") testImplementation("org.junit-pioneer:junit-pioneer:2.2.0") // Paper - CartesianTest implementation("net.neoforged:srgutils:1.0.9") // Paper - mappings handling @@ -17,7 +17,7 @@ index 7d3db5e39f33b73b852141c8b24c017e1b55ffb1..2369b767cadcca95ba69f8b01b9cd90a } paperweight { -@@ -165,20 +166,41 @@ val runtimeClasspathWithoutVanillaServer = configurations.runtimeClasspath.flatM +@@ -170,20 +171,41 @@ val runtimeClasspathWithoutVanillaServer = configurations.runtimeClasspath.flatM runtime.filterNot { it.asFile.absolutePath == vanilla } } diff --git a/patches/server/0022-Remap-reflection-calls-in-plugins-using-internals.patch b/patches/server/0022-Remap-reflection-calls-in-plugins-using-internals.patch index e97fb9b36a..34172199b4 100644 --- a/patches/server/0022-Remap-reflection-calls-in-plugins-using-internals.patch +++ b/patches/server/0022-Remap-reflection-calls-in-plugins-using-internals.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Remap reflection calls in plugins using internals Co-authored-by: Jason Penilla <11360596+jpenilla@users.noreply.github.com> diff --git a/build.gradle.kts b/build.gradle.kts -index 2369b767cadcca95ba69f8b01b9cd90a9e254dc8..0badf522f5adb93af81950d48d12623318c06e78 100644 +index c972a9b1a632f9e6a0873fe7d363c3b3c9e5f5fe..696bada19a7d3449dfb525c255becbed825e5c16 100644 --- a/build.gradle.kts +++ b/build.gradle.kts -@@ -48,6 +48,12 @@ dependencies { +@@ -53,6 +53,12 @@ dependencies { testImplementation("org.junit-pioneer:junit-pioneer:2.2.0") // Paper - CartesianTest implementation("net.neoforged:srgutils:1.0.9") // Paper - mappings handling implementation("net.neoforged:AutoRenamingTool:2.0.3") // Paper - remap plugins diff --git a/patches/server/0034-Expose-server-build-information.patch b/patches/server/0034-Expose-server-build-information.patch index 99fc66075b..3540ec8999 100644 --- a/patches/server/0034-Expose-server-build-information.patch +++ b/patches/server/0034-Expose-server-build-information.patch @@ -11,7 +11,7 @@ Co-authored-by: Jake Potrebic Co-authored-by: masmc05 diff --git a/build.gradle.kts b/build.gradle.kts -index 0badf522f5adb93af81950d48d12623318c06e78..1c61eaf86a342345ec9bed3e666efbe2842f0111 100644 +index 696bada19a7d3449dfb525c255becbed825e5c16..ed2d66b44d701f9e2f30428b9f51d5dc03dc38a0 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,4 +1,5 @@ @@ -20,7 +20,7 @@ index 0badf522f5adb93af81950d48d12623318c06e78..1c61eaf86a342345ec9bed3e666efbe2 plugins { java -@@ -65,18 +66,24 @@ tasks.jar { +@@ -70,18 +71,24 @@ tasks.jar { manifest { val git = Git(rootProject.layout.projectDirectory.path) diff --git a/patches/server/0356-Implement-Mob-Goal-API.patch b/patches/server/0356-Implement-Mob-Goal-API.patch index e95df1b1b9..aacf24dc45 100644 --- a/patches/server/0356-Implement-Mob-Goal-API.patch +++ b/patches/server/0356-Implement-Mob-Goal-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Implement Mob Goal API diff --git a/build.gradle.kts b/build.gradle.kts -index 1c61eaf86a342345ec9bed3e666efbe2842f0111..1196756613a9a2a0fc33367ccaca868e3cbb737d 100644 +index ed2d66b44d701f9e2f30428b9f51d5dc03dc38a0..ed7d58b45bfb0fb2b636ae5b1b057bdaec0347ac 100644 --- a/build.gradle.kts +++ b/build.gradle.kts -@@ -42,6 +42,7 @@ dependencies { +@@ -47,6 +47,7 @@ dependencies { runtimeOnly("org.apache.maven.resolver:maven-resolver-connector-basic:1.9.18") runtimeOnly("org.apache.maven.resolver:maven-resolver-transport-http:1.9.18") diff --git a/patches/server/0706-Add-support-for-Proxy-Protocol.patch b/patches/server/0706-Add-support-for-Proxy-Protocol.patch index be625da89e..8fc8b29bad 100644 --- a/patches/server/0706-Add-support-for-Proxy-Protocol.patch +++ b/patches/server/0706-Add-support-for-Proxy-Protocol.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add support for Proxy Protocol diff --git a/build.gradle.kts b/build.gradle.kts -index 1196756613a9a2a0fc33367ccaca868e3cbb737d..c5763b1ade6dbc806ab579be2f2a9cfcca0e0c33 100644 +index ed7d58b45bfb0fb2b636ae5b1b057bdaec0347ac..28d25e6821f4e8ce9253a8025dc4094e6cacd0fa 100644 --- a/build.gradle.kts +++ b/build.gradle.kts -@@ -29,6 +29,7 @@ dependencies { +@@ -34,6 +34,7 @@ dependencies { log4jPlugins.annotationProcessorConfigurationName("org.apache.logging.log4j:log4j-core:2.19.0") // Paper - Needed to generate meta for our Log4j plugins runtimeOnly(log4jPlugins.output) alsoShade(log4jPlugins.output) diff --git a/patches/server/1006-Use-Velocity-compression-and-cipher-natives.patch b/patches/server/1006-Use-Velocity-compression-and-cipher-natives.patch index a2f414a3ad..f24145a5b3 100644 --- a/patches/server/1006-Use-Velocity-compression-and-cipher-natives.patch +++ b/patches/server/1006-Use-Velocity-compression-and-cipher-natives.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Use Velocity compression and cipher natives diff --git a/build.gradle.kts b/build.gradle.kts -index c5763b1ade6dbc806ab579be2f2a9cfcca0e0c33..5e427cbc1c371cb800a6812a6ac9a9bf5fcc4290 100644 +index 28d25e6821f4e8ce9253a8025dc4094e6cacd0fa..a73ac2d5d2bcaeb046ab76e06dfcd5a68a70a2f3 100644 --- a/build.gradle.kts +++ b/build.gradle.kts -@@ -38,6 +38,11 @@ dependencies { +@@ -43,6 +43,11 @@ dependencies { runtimeOnly("org.xerial:sqlite-jdbc:3.46.0.0") runtimeOnly("com.mysql:mysql-connector-j:8.4.0") runtimeOnly("com.lmax:disruptor:3.4.4") // Paper