diff --git a/build.gradle.kts b/build.gradle.kts index f5a14047..d7648ff1 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -202,7 +202,7 @@ for (module in modrinthModules) { token.set(modrinthApiKey) projectId.set("${property("modrinthProjectID")}") - versionNumber.set((if (isRelease) versionString else publishVersion.replace("-build.", "-b")) + "-${module.name.lowercase()}") + versionNumber.set((if (isRelease) versionString else publishVersion.replace("-build.", "-b").replace("-SNAPSHOT", "")) + "-${module.id.lowercase()}") versionType.set(System.getenv("MODRINTH_BUILD_CHANNEL") ?: "beta") uploadFile.set(project(":sayanvanish-bukkit").tasks.shadowJar.flatMap { it.archiveFile }) when (module) { diff --git a/buildSrc/src/main/kotlin/org/sayandev/Module.kt b/buildSrc/src/main/kotlin/org/sayandev/Module.kt index ed583f70..b8f38aca 100644 --- a/buildSrc/src/main/kotlin/org/sayandev/Module.kt +++ b/buildSrc/src/main/kotlin/org/sayandev/Module.kt @@ -1,8 +1,8 @@ package org.sayandev -enum class Module { - API, - BUKKIT, - VELOCITY, - BUNGEECORD +enum class Module(val id: String) { + API("api"), + BUKKIT("bukkit"), + VELOCITY("velocity"), + BUNGEECORD("bungee") } \ No newline at end of file