From 7c2ffd5e5780420cda17aea6c978cfef8ed2a1ba Mon Sep 17 00:00:00 2001 From: Owen1212055 <23108066+Owen1212055@users.noreply.github.com> Date: Fri, 6 Jun 2025 22:39:01 -0400 Subject: [PATCH] Prune the api version suffix This is needed for the test plugin, as the bukkit api does not support these versions in the plugin manifest. Alternatively we could add another gradle property --- test-plugin/build.gradle.kts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/test-plugin/build.gradle.kts b/test-plugin/build.gradle.kts index 9f7d9da599..7813bc6289 100644 --- a/test-plugin/build.gradle.kts +++ b/test-plugin/build.gradle.kts @@ -5,7 +5,13 @@ dependencies { } tasks.processResources { - val apiVersion = rootProject.providers.gradleProperty("mcVersion").get() + var apiVersion = rootProject.providers.gradleProperty("mcVersion").get() + // Bukkit api versioning does not support suffixed versions + val possibleSuffix = apiVersion.indexOf('-') + if (possibleSuffix != -1) { + apiVersion = apiVersion.substring(0, possibleSuffix); + } + val props = mapOf( "version" to project.version, "apiversion" to "\"$apiVersion\"",