aboutsummaryrefslogtreecommitdiff
path: root/build.gradle.kts
diff options
context:
space:
mode:
authorisXander <xander@isxander.dev>2024-10-19 19:31:24 +0100
committerisXander <xander@isxander.dev>2024-10-19 19:31:24 +0100
commit0d628fe408f0b1ef4175ca1097456dc06c716cd2 (patch)
tree6e7c01d8beb0393ff819078a92ce931a5f66e1ad /build.gradle.kts
parente73a08e6672fb380cab8db71340158969c5ef56b (diff)
downloadYetAnotherConfigLib-0d628fe408f0b1ef4175ca1097456dc06c716cd2.tar.gz
YetAnotherConfigLib-0d628fe408f0b1ef4175ca1097456dc06c716cd2.tar.bz2
YetAnotherConfigLib-0d628fe408f0b1ef4175ca1097456dc06c716cd2.zip
fix publishing versions
Diffstat (limited to 'build.gradle.kts')
-rw-r--r--build.gradle.kts9
1 files changed, 8 insertions, 1 deletions
diff --git a/build.gradle.kts b/build.gradle.kts
index 2d8162d..33d85df 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -242,8 +242,13 @@ publishMods {
})
modLoaders.add(loader)
+ fun versionList(prop: String) = findProperty(prop)?.toString()
+ ?.split(',')
+ ?.map { it.trim() }
+ ?: emptyList()
+
// modrinth and curseforge use different formats for snapshots. this can be expressed globally
- val stableMCVersions = listOf(stonecutter.current.version)
+ val stableMCVersions = versionList("pub.stableMC")
val modrinthId: String by project
if (modrinthId.isNotBlank() && hasProperty("modrinth.token")) {
@@ -251,6 +256,7 @@ publishMods {
projectId.set(modrinthId)
accessToken.set(findProperty("modrinth.token")?.toString())
minecraftVersions.addAll(stableMCVersions)
+ minecraftVersions.addAll(versionList("pub.modrinthMC"))
requires { slug.set("fabric-api") }
}
@@ -262,6 +268,7 @@ publishMods {
projectId.set(curseforgeId)
accessToken.set(findProperty("curseforge.token")?.toString())
minecraftVersions.addAll(stableMCVersions)
+ minecraftVersions.addAll(versionList("pub.curseforgeMC"))
requires { slug.set("fabric-api") }
}