From 8ddd31797cb04d4981160868c06655474e65eeeb Mon Sep 17 00:00:00 2001 From: Octavia Togami Date: Sun, 22 May 2022 00:02:35 -0700 Subject: [PATCH] Fix fastutil on sponge (#2099) VG excludes the wrong version, PR has been made --- worldedit-bukkit/build.gradle.kts | 17 +++++++---------- worldedit-sponge/build.gradle.kts | 19 +++++++++++-------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/worldedit-bukkit/build.gradle.kts b/worldedit-bukkit/build.gradle.kts index cf4cebc6a..9f8205a97 100644 --- a/worldedit-bukkit/build.gradle.kts +++ b/worldedit-bukkit/build.gradle.kts @@ -84,20 +84,17 @@ // In tandem with not bundling log4j, we shouldn't relocate base package here. // relocate("org.apache.logging", "com.sk89q.worldedit.log4j") relocate("org.antlr.v4", "com.sk89q.worldedit.antlr4") - include(dependency(":worldedit-core")) // Purposefully not included, we assume (even though no API exposes it) that Log4J will be present at runtime // If it turns out not to be true for Spigot/Paper, our only two official platforms, this can be uncommented. // include(dependency("org.apache.logging.log4j:log4j-api")) include(dependency("org.antlr:antlr4-runtime")) - relocate("org.bstats", "com.sk89q.worldedit.bstats") { - include(dependency("org.bstats:")) - } - relocate("io.papermc.lib", "com.sk89q.worldedit.bukkit.paperlib") { - include(dependency("io.papermc:paperlib")) - } - relocate("it.unimi.dsi.fastutil", "com.sk89q.worldedit.bukkit.fastutil") { - include(dependency("it.unimi.dsi:fastutil")) - } + include(dependency("org.bstats:")) + include(dependency("io.papermc:paperlib")) + include(dependency("it.unimi.dsi:fastutil")) + + relocate("org.bstats", "com.sk89q.worldedit.bstats") + relocate("io.papermc.lib", "com.sk89q.worldedit.bukkit.paperlib") + relocate("it.unimi.dsi.fastutil", "com.sk89q.worldedit.bukkit.fastutil") } } diff --git a/worldedit-sponge/build.gradle.kts b/worldedit-sponge/build.gradle.kts index 01abcca43..b0699c9af 100644 --- a/worldedit-sponge/build.gradle.kts +++ b/worldedit-sponge/build.gradle.kts @@ -50,11 +50,17 @@ dependencies { api(project(":worldedit-core")) api(project(":worldedit-libs:sponge")) + // TODO remove after VG merges and releases my patch + // https://github.com/SpongePowered/VanillaGradle/pull/66 + minecraft(minecraft.platform().get().moduleName() + ":" + minecraft.version().get()) { + exclude("it.unimi.dsi", "fastutil") + } implementation(platform("org.apache.logging.log4j:log4j-bom:${Versions.LOG4J}") { because("Sponge 8 (will?) provides Log4J") }) api("org.apache.logging.log4j:log4j-api") implementation("org.bstats:bstats-sponge:3.0.0") + implementation("it.unimi.dsi:fastutil") testImplementation("org.mockito:mockito-core:${Versions.MOCKITO}") } @@ -66,16 +72,13 @@ tasks.named("shadowJar") { dependencies { - relocate("org.bstats", "com.sk89q.worldedit.sponge.bstats") { - include(dependency("org.bstats:")) - } - include(dependency(":worldedit-core")) + include(dependency("org.bstats:")) + include(dependency("org.antlr:antlr4-runtime")) + include(dependency("it.unimi.dsi:fastutil")) relocate("org.antlr.v4", "com.sk89q.worldedit.antlr4") - include(dependency("org.antlr:antlr4-runtime")) - relocate("it.unimi.dsi.fastutil", "com.sk89q.worldedit.sponge.fastutil") { - include(dependency("it.unimi.dsi:fastutil")) - } + relocate("org.bstats", "com.sk89q.worldedit.sponge.bstats") + relocate("it.unimi.dsi.fastutil", "com.sk89q.worldedit.sponge.fastutil") } } tasks.named("assemble").configure {