From 5e9535db41057dc65bac28ec9cb0e5b51c437ffd Mon Sep 17 00:00:00 2001 From: dordsor21 Date: Sat, 24 Jul 2021 14:12:59 +0100 Subject: [PATCH] Re-add shading/relocation of fastutils and add a dumb class because minimise doesn't scan worldedit-adapters --- worldedit-bukkit/build.gradle.kts | 6 +++--- .../bukkit/util/DoNotMiniseThese.java | 18 ++++++++++++++++++ 2 files changed, 21 insertions(+), 3 deletions(-) create mode 100644 worldedit-bukkit/src/main/java/com/fastasyncworldedit/bukkit/util/DoNotMiniseThese.java diff --git a/worldedit-bukkit/build.gradle.kts b/worldedit-bukkit/build.gradle.kts index d0dca3477..a5432ea87 100644 --- a/worldedit-bukkit/build.gradle.kts +++ b/worldedit-bukkit/build.gradle.kts @@ -147,9 +147,9 @@ tasks.named("shadowJar") { 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")) -// } + relocate("it.unimi.dsi.fastutil", "com.sk89q.worldedit.bukkit.fastutil") { + include(dependency("it.unimi.dsi:fastutil")) + } relocate("org.incendo.serverlib", "com.fastasyncworldedit.serverlib") { include(dependency("org.incendo.serverlib:ServerLib:2.2.1")) } diff --git a/worldedit-bukkit/src/main/java/com/fastasyncworldedit/bukkit/util/DoNotMiniseThese.java b/worldedit-bukkit/src/main/java/com/fastasyncworldedit/bukkit/util/DoNotMiniseThese.java new file mode 100644 index 000000000..11d4e340a --- /dev/null +++ b/worldedit-bukkit/src/main/java/com/fastasyncworldedit/bukkit/util/DoNotMiniseThese.java @@ -0,0 +1,18 @@ +package com.fastasyncworldedit.bukkit.util; + +import it.unimi.dsi.fastutil.longs.Long2ObjectLinkedOpenHashMap; +import it.unimi.dsi.fastutil.longs.LongArraySet; +import it.unimi.dsi.fastutil.longs.LongIterator; +import it.unimi.dsi.fastutil.longs.LongSet; +import it.unimi.dsi.fastutil.ints.Int2ObjectMap; + +/** + * Class to prevent the above/below being removed from shaded/relocated dependencies via minimization + */ +final class DoNotMiniseThese { + private final Long2ObjectLinkedOpenHashMap a = null; + private final LongArraySet b = null; + private final LongIterator c = null; + private final LongSet d = null; + private final Int2ObjectMap e = null; +}