Update Hangar publish plugin

This commit is contained in:
Nassim Jahnke 2024-03-22 20:49:57 +01:00
parent 13efe47a5c
commit 4074231a57
No known key found for this signature in database
GPG Key ID: EF6771C01F6EF02F

View File

@ -1,7 +1,5 @@
import io.papermc.hangarpublishplugin.model.Platforms
plugins { plugins {
id("io.papermc.hangar-publish-plugin") version "0.1.0" id("io.papermc.hangar-publish-plugin") version "0.1.2"
id("com.modrinth.minotaur") version "2.+" id("com.modrinth.minotaur") version "2.+"
} }
@ -80,15 +78,15 @@ if (!isRelease || isMainBranch) { // Only publish releases from the main branch
changelog.set(changelogContent) changelog.set(changelogContent)
apiKey.set(System.getenv("HANGAR_TOKEN")) apiKey.set(System.getenv("HANGAR_TOKEN"))
platforms { platforms {
register(Platforms.PAPER) { paper {
jar.set(tasks.shadowJar.flatMap { it.archiveFile }) jar.set(tasks.shadowJar.flatMap { it.archiveFile })
platformVersions.set(listOf(property("mcVersionRange") as String)) platformVersions.set(listOf(property("mcVersionRange") as String))
} }
register(Platforms.VELOCITY) { velocity {
jar.set(tasks.shadowJar.flatMap { it.archiveFile }) jar.set(tasks.shadowJar.flatMap { it.archiveFile })
platformVersions.set(listOf(property("velocityVersion") as String)) platformVersions.set(listOf(property("velocityVersion") as String))
} }
register(Platforms.WATERFALL) { waterfall {
jar.set(tasks.shadowJar.flatMap { it.archiveFile }) jar.set(tasks.shadowJar.flatMap { it.archiveFile })
platformVersions.set(listOf(property("waterfallVersion") as String)) platformVersions.set(listOf(property("waterfallVersion") as String))
} }