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
This commit is contained in:
Owen1212055
2025-06-06 22:39:01 -04:00
parent 73d218c154
commit 7c2ffd5e57

View File

@@ -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\"",