From 7b6179345f77c73ad3cabc4d2c1a8d575df2d3b5 Mon Sep 17 00:00:00 2001 From: Jason Penilla <11360596+jpenilla@users.noreply.github.com> Date: Fri, 26 Nov 2021 22:54:18 -0800 Subject: [PATCH] Remove redundant json-simple dependency and move isTransitive = false from server to api --- patches/api/Add-FastUtil-to-Bukkit.patch | 8 ++++---- patches/api/Adventure.patch | 6 +++--- .../api/Allow-plugins-to-use-SLF4J-for-logging.patch | 8 ++++---- patches/api/Build-system-changes.patch | 6 +++++- patches/api/Use-ASM-for-event-executors.patch | 10 +++++----- patches/server/Build-system-changes.patch | 6 +++--- patches/server/Setup-Gradle-project.patch | 4 ---- ...ncAppender-to-keep-logging-IO-off-main-thread.patch | 2 +- 8 files changed, 25 insertions(+), 25 deletions(-) diff --git a/patches/api/Add-FastUtil-to-Bukkit.patch b/patches/api/Add-FastUtil-to-Bukkit.patch index 2dbdef4f39..4ebf64b396 100644 --- a/patches/api/Add-FastUtil-to-Bukkit.patch +++ b/patches/api/Add-FastUtil-to-Bukkit.patch @@ -10,10 +10,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -0,0 +0,0 @@ dependencies { - api("net.md-5:bungeecord-chat:1.16-R0.4") - api("org.yaml:snakeyaml:1.28") - api("com.googlecode.json-simple:json-simple:1.1.1") // Paper + api("com.googlecode.json-simple:json-simple:1.1.1") { + isTransitive = false // includes junit + } + api("it.unimi.dsi:fastutil:8.5.6") + // Paper end compileOnly("org.apache.maven:maven-resolver-provider:3.8.1") - compileOnly("org.apache.maven.resolver:maven-resolver-connector-basic:1.7.0") diff --git a/patches/api/Adventure.patch b/patches/api/Adventure.patch index 97c389107e..7e3b1b5819 100644 --- a/patches/api/Adventure.patch +++ b/patches/api/Adventure.patch @@ -31,17 +31,17 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 // api dependencies are listed transitively to API consumers api("commons-lang:commons-lang:2.6") @@ -0,0 +0,0 @@ dependencies { - api("org.yaml:snakeyaml:1.28") - api("com.googlecode.json-simple:json-simple:1.1.1") // Paper + isTransitive = false // includes junit + } api("it.unimi.dsi:fastutil:8.5.6") + apiAndDocs(platform("net.kyori:adventure-bom:$adventureVersion")) + apiAndDocs("net.kyori:adventure-api") + apiAndDocs("net.kyori:adventure-text-serializer-gson") + apiAndDocs("net.kyori:adventure-text-serializer-legacy") + apiAndDocs("net.kyori:adventure-text-serializer-plain") + // Paper end compileOnly("org.apache.maven:maven-resolver-provider:3.8.1") - compileOnly("org.apache.maven.resolver:maven-resolver-connector-basic:1.7.0") @@ -0,0 +0,0 @@ tasks.jar { } diff --git a/patches/api/Allow-plugins-to-use-SLF4J-for-logging.patch b/patches/api/Allow-plugins-to-use-SLF4J-for-logging.patch index 5efd92de6f..8d35c9f992 100644 --- a/patches/api/Allow-plugins-to-use-SLF4J-for-logging.patch +++ b/patches/api/Allow-plugins-to-use-SLF4J-for-logging.patch @@ -21,11 +21,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 apiAndDocs("net.kyori:adventure-text-serializer-gson") apiAndDocs("net.kyori:adventure-text-serializer-legacy") apiAndDocs("net.kyori:adventure-text-serializer-plain") -+ api("org.apache.logging.log4j:log4j-api:2.14.1") // Paper -+ api("org.slf4j:slf4j-api:1.7.30") // Paper ++ api("org.apache.logging.log4j:log4j-api:2.14.1") ++ api("org.slf4j:slf4j-api:1.8.0-beta4") - implementation("org.ow2.asm:asm:9.1") - implementation("org.ow2.asm:asm-commons:9.1") + implementation("org.ow2.asm:asm:9.2") + implementation("org.ow2.asm:asm-commons:9.2") diff --git a/src/main/java/org/bukkit/plugin/Plugin.java b/src/main/java/org/bukkit/plugin/Plugin.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/org/bukkit/plugin/Plugin.java diff --git a/patches/api/Build-system-changes.patch b/patches/api/Build-system-changes.patch index 4228bc8577..23a74a8eb2 100644 --- a/patches/api/Build-system-changes.patch +++ b/patches/api/Build-system-changes.patch @@ -12,7 +12,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 api("com.google.code.gson:gson:2.8.8") api("net.md-5:bungeecord-chat:1.16-R0.4") api("org.yaml:snakeyaml:1.28") -+ api("com.googlecode.json-simple:json-simple:1.1.1") // Paper ++ // Paper start ++ api("com.googlecode.json-simple:json-simple:1.1.1") { ++ isTransitive = false // includes junit ++ } ++ // Paper end compileOnly("org.apache.maven:maven-resolver-provider:3.8.1") compileOnly("org.apache.maven.resolver:maven-resolver-connector-basic:1.7.0") diff --git a/patches/api/Use-ASM-for-event-executors.patch b/patches/api/Use-ASM-for-event-executors.patch index beb99bd5c8..f33734a915 100644 --- a/patches/api/Use-ASM-for-event-executors.patch +++ b/patches/api/Use-ASM-for-event-executors.patch @@ -10,15 +10,15 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -0,0 +0,0 @@ dependencies { + apiAndDocs("net.kyori:adventure-text-serializer-gson") apiAndDocs("net.kyori:adventure-text-serializer-legacy") apiAndDocs("net.kyori:adventure-text-serializer-plain") - -+ implementation("org.ow2.asm:asm:9.1") -+ implementation("org.ow2.asm:asm-commons:9.1") + ++ implementation("org.ow2.asm:asm:9.2") ++ implementation("org.ow2.asm:asm-commons:9.2") + // Paper end + compileOnly("org.apache.maven:maven-resolver-provider:3.8.1") - compileOnly("org.apache.maven.resolver:maven-resolver-connector-basic:1.7.0") - compileOnly("org.apache.maven.resolver:maven-resolver-transport-http:1.7.0") diff --git a/src/main/java/com/destroystokyo/paper/event/executor/MethodHandleEventExecutor.java b/src/main/java/com/destroystokyo/paper/event/executor/MethodHandleEventExecutor.java new file mode 100644 index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 diff --git a/patches/server/Build-system-changes.patch b/patches/server/Build-system-changes.patch index 755b553750..aa4e78db31 100644 --- a/patches/server/Build-system-changes.patch +++ b/patches/server/Build-system-changes.patch @@ -18,9 +18,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + implementation("org.apache.logging.log4j:log4j-iostreams:2.14.1") // Paper implementation("org.ow2.asm:asm:9.2") + implementation("org.ow2.asm:asm-commons:9.2") // Paper - ASM event executor generation - implementation("com.googlecode.json-simple:json-simple:1.1.1") { - // This includes junit transitively for whatever reason - isTransitive = false + runtimeOnly("org.xerial:sqlite-jdbc:3.36.0.3") + runtimeOnly("mysql:mysql-connector-java:8.0.27") + @@ -0,0 +0,0 @@ tasks.jar { val gitHash = git("rev-parse", "--short=7", "HEAD").getText().trim() val implementationVersion = System.getenv("BUILD_NUMBER") ?: "\"$gitHash\"" diff --git a/patches/server/Setup-Gradle-project.patch b/patches/server/Setup-Gradle-project.patch index 51a8602fb6..7802f1795e 100644 --- a/patches/server/Setup-Gradle-project.patch +++ b/patches/server/Setup-Gradle-project.patch @@ -51,10 +51,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + exclude(group = "org.apache.logging.log4j", module = "log4j-api") + } + implementation("org.ow2.asm:asm:9.2") -+ implementation("com.googlecode.json-simple:json-simple:1.1.1") { -+ // This includes junit transitively for whatever reason -+ isTransitive = false -+ } + runtimeOnly("org.xerial:sqlite-jdbc:3.36.0.3") + runtimeOnly("mysql:mysql-connector-java:8.0.27") + diff --git a/patches/server/Use-AsyncAppender-to-keep-logging-IO-off-main-thread.patch b/patches/server/Use-AsyncAppender-to-keep-logging-IO-off-main-thread.patch index 9bea4f88b9..2f091c367a 100644 --- a/patches/server/Use-AsyncAppender-to-keep-logging-IO-off-main-thread.patch +++ b/patches/server/Use-AsyncAppender-to-keep-logging-IO-off-main-thread.patch @@ -9,7 +9,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -0,0 +0,0 @@ dependencies { - } + implementation("org.ow2.asm:asm-commons:9.2") // Paper - ASM event executor generation runtimeOnly("org.xerial:sqlite-jdbc:3.36.0.3") runtimeOnly("mysql:mysql-connector-java:8.0.27") + runtimeOnly("com.lmax:disruptor:3.4.4") // Paper