From 3c1d1d5abaf90d3fe73394308dc45ed9fa0883b5 Mon Sep 17 00:00:00 2001 From: Pierre Maurice Schwang Date: Wed, 17 Sep 2025 22:26:05 +0200 Subject: [PATCH] fix: binary incompatibility on 1.21.1 --- Bukkit/build.gradle.kts | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/Bukkit/build.gradle.kts b/Bukkit/build.gradle.kts index 25ac3fb2d..2f0f9d20a 100644 --- a/Bukkit/build.gradle.kts +++ b/Bukkit/build.gradle.kts @@ -17,6 +17,19 @@ repositories { } } +// Make sure we control the exact version of paper being included, while dropping spigot + bukkit +configurations.all { + exclude("org.bukkit") + exclude("org.spigotmc") + + resolutionStrategy.eachDependency { + if (requested.group == "io.papermc.paper" && requested.name == "paper-api") { + useVersion(checkNotNull(libs.paper.orNull?.version)) + because("specific paper version is required to prevent binary incompatibilities on older versions") + } + } +} + dependencies { api(projects.plotsquaredCore) @@ -28,20 +41,13 @@ dependencies { implementation(libs.paperlib) // Plugins - compileOnly(libs.worldeditBukkit) { - exclude(group = "org.bukkit") - exclude(group = "org.spigotmc") - } + compileOnly(libs.worldeditBukkit) compileOnly(libs.faweBukkit) { isTransitive = false } testImplementation(libs.faweBukkit) { isTransitive = false } - compileOnly(libs.vault) { - exclude(group = "org.bukkit") - } + compileOnly(libs.vault) compileOnly(libs.placeholderapi) compileOnly(libs.luckperms) - compileOnly(libs.essentialsx) { - exclude(group = "org.spigotmc") - } + compileOnly(libs.essentialsx) compileOnly(libs.mvdwapi) { isTransitive = false } // Other libraries