From 99912dc93724acc6db6c61a474455cc957d1569f Mon Sep 17 00:00:00 2001 From: Vankka Date: Mon, 12 Aug 2024 20:38:35 +0300 Subject: [PATCH] Fix test compile, upgrade GitHub Actions JVM version --- .github/workflows/build.yaml | 2 +- .github/workflows/crowdin-download.yaml | 2 +- .github/workflows/crowdin-upload.yaml | 2 +- bukkit/paper/build.gradle | 2 +- .../bungee/component/util/BungeeComponentUtil.java | 1 + .../game/MinecraftToDiscordChatMessageTest.java | 7 +++++++ 6 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 28282d40..2158495d 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -15,7 +15,7 @@ jobs: uses: actions/setup-java@v4 with: distribution: 'temurin' - java-version: 17 + java-version: 22 cache: 'gradle' - name: Setup Gradle uses: gradle/actions/setup-gradle@v3 diff --git a/.github/workflows/crowdin-download.yaml b/.github/workflows/crowdin-download.yaml index 519f7f03..e73cfeab 100644 --- a/.github/workflows/crowdin-download.yaml +++ b/.github/workflows/crowdin-download.yaml @@ -15,7 +15,7 @@ jobs: uses: actions/setup-java@v4 with: distribution: 'temurin' - java-version: 17 + java-version: 22 cache: 'gradle' - name: Setup Gradle uses: gradle/actions/setup-gradle@v3 diff --git a/.github/workflows/crowdin-upload.yaml b/.github/workflows/crowdin-upload.yaml index 8bee85bb..333db749 100644 --- a/.github/workflows/crowdin-upload.yaml +++ b/.github/workflows/crowdin-upload.yaml @@ -14,7 +14,7 @@ jobs: uses: actions/setup-java@v4 with: distribution: 'temurin' - java-version: 17 + java-version: 22 cache: 'gradle' - name: Setup Gradle uses: gradle/actions/setup-gradle@v3 diff --git a/bukkit/paper/build.gradle b/bukkit/paper/build.gradle index be85924f..e67adf24 100644 --- a/bukkit/paper/build.gradle +++ b/bukkit/paper/build.gradle @@ -1,5 +1,5 @@ java { - disableAutoTargetJvm() // Requires Java 17, we target 8 + disableAutoTargetJvm() // Requires Java 21, we target 8 } dependencies { diff --git a/bungee/src/main/java/com/discordsrv/bungee/component/util/BungeeComponentUtil.java b/bungee/src/main/java/com/discordsrv/bungee/component/util/BungeeComponentUtil.java index a8f4477c..592a880d 100644 --- a/bungee/src/main/java/com/discordsrv/bungee/component/util/BungeeComponentUtil.java +++ b/bungee/src/main/java/com/discordsrv/bungee/component/util/BungeeComponentUtil.java @@ -27,6 +27,7 @@ public final class BungeeComponentUtil { private BungeeComponentUtil() {} + @SuppressWarnings("deprecation") // Array method public static Component fromLegacy(String legacy) { BaseComponent[] components = TextComponent.fromLegacyText(legacy); return BungeeComponentSerializer.get().deserialize(components); diff --git a/common/src/test/java/com/discordsrv/common/messageforwarding/game/MinecraftToDiscordChatMessageTest.java b/common/src/test/java/com/discordsrv/common/messageforwarding/game/MinecraftToDiscordChatMessageTest.java index f97906f5..099fa156 100644 --- a/common/src/test/java/com/discordsrv/common/messageforwarding/game/MinecraftToDiscordChatMessageTest.java +++ b/common/src/test/java/com/discordsrv/common/messageforwarding/game/MinecraftToDiscordChatMessageTest.java @@ -43,6 +43,7 @@ import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; +import java.util.Collection; import java.util.Locale; import java.util.UUID; import java.util.concurrent.CompletableFuture; @@ -97,6 +98,12 @@ public class MinecraftToDiscordChatMessageTest { return null; } + @Override + public void addChatSuggestions(Collection suggestions) {} + + @Override + public void removeChatSuggestions(Collection suggestions) {} + @Override public @Nullable SkinInfo skinInfo() { return null;