mirror of
https://github.com/PaperMC/Paper.git
synced 2025-07-26 09:42:06 -07:00
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:
@@ -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\"",
|
||||
|
Reference in New Issue
Block a user