From 08930b96a472b314f8d9394e1f6e7d4b82624afa Mon Sep 17 00:00:00 2001 From: zml Date: Tue, 23 Jan 2024 15:08:39 -0800 Subject: [PATCH] chore(build): Silence some warnings from Adventure references --- build.gradle.kts | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 91c00324ae..a919b0cea5 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -25,6 +25,14 @@ val ap by sourceSets.registering { compileClasspath += sourceSets.main.get().compileClasspath + sourceSets.main.get().output } +configurations { + sequenceOf(apiElements, runtimeElements).forEach { + it.configure { + exclude(group = "org.jetbrains", module = "annotations") + } + } +} + // Project dependencies dependencies { // Directly tied to what's available from Minecraft @@ -33,9 +41,7 @@ dependencies { // Adventure api(platform(libs.adventure.bom)) - api(libs.adventure.api) { - exclude(group = "org.jetbrains", module = "annotations") - } + api(libs.adventure.api) api(libs.adventure.textSerializer.gson) { exclude(group = "com.google.code.gson", module = "gson") exclude(group = "net.kyori", module = "adventure-api") @@ -120,7 +126,7 @@ dependencies { tasks { genEventImpl { - sourceCompatibility = "16" + sourceCompatibility = "17" destinationDir = project.layout.buildDirectory.dir("generated/event-factory").get().asFile outputFactory = "org.spongepowered.api.event.SpongeEventFactory"