From 4fa0bcd01b9ca897bf33f4e6d2187997caadb22b Mon Sep 17 00:00:00 2001 From: chris Date: Thu, 21 Mar 2024 19:05:41 +0100 Subject: [PATCH] Update Jackson (#4512) * Update jackson * relocate yaml on velocity --- bootstrap/velocity/build.gradle.kts | 1 + .../geysermc/geyser/extension/GeyserExtensionDescription.java | 3 ++- gradle/libs.versions.toml | 4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/bootstrap/velocity/build.gradle.kts b/bootstrap/velocity/build.gradle.kts index a21fb2349..97e9d1f57 100644 --- a/bootstrap/velocity/build.gradle.kts +++ b/bootstrap/velocity/build.gradle.kts @@ -8,6 +8,7 @@ dependencies { platformRelocate("com.fasterxml.jackson") platformRelocate("it.unimi.dsi.fastutil") platformRelocate("net.kyori.adventure.text.serializer.gson.legacyimpl") +platformRelocate("org.yaml") exclude("com.google.*:*") diff --git a/core/src/main/java/org/geysermc/geyser/extension/GeyserExtensionDescription.java b/core/src/main/java/org/geysermc/geyser/extension/GeyserExtensionDescription.java index 716b763f5..239ffc450 100644 --- a/core/src/main/java/org/geysermc/geyser/extension/GeyserExtensionDescription.java +++ b/core/src/main/java/org/geysermc/geyser/extension/GeyserExtensionDescription.java @@ -31,6 +31,7 @@ import org.checkerframework.checker.nullness.qual.NonNull; import org.geysermc.geyser.api.extension.ExtensionDescription; import org.geysermc.geyser.api.extension.exception.InvalidDescriptionException; import org.geysermc.geyser.text.GeyserLocale; +import org.yaml.snakeyaml.LoaderOptions; import org.yaml.snakeyaml.Yaml; import org.yaml.snakeyaml.constructor.CustomClassLoaderConstructor; @@ -48,7 +49,7 @@ public record GeyserExtensionDescription(@NonNull String id, @NonNull String version, @NonNull List authors) implements ExtensionDescription { - private static final Yaml YAML = new Yaml(new CustomClassLoaderConstructor(Source.class.getClassLoader())); + private static final Yaml YAML = new Yaml(new CustomClassLoaderConstructor(Source.class.getClassLoader(), new LoaderOptions())); public static final Pattern ID_PATTERN = Pattern.compile("[a-z][a-z0-9-_]{0,63}"); public static final Pattern NAME_PATTERN = Pattern.compile("^[A-Za-z_.-]+$"); diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 73417f23a..377172346 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -3,7 +3,7 @@ base-api = "1.0.0-SNAPSHOT" cumulus = "1.1.2" erosion = "1.0-20230406.174837-8" events = "1.1-SNAPSHOT" -jackson = { strictly = "2.14.0" } # Don't let other dependencies override +jackson = "2.17.0" fastutil = "8.5.2" netty = "4.1.107.Final" guava = "29.0-jre" @@ -38,7 +38,7 @@ mixin = "0.8.5" # plugin versions indra = "3.1.3" -shadow = "7.1.3-SNAPSHOT" +shadow = "8.1.1" architectury-plugin = "3.4-SNAPSHOT" architectury-loom = "1.4-SNAPSHOT" minotaur = "2.8.7"