Skip to content

Commit c142c82

Browse files
committed
Add hangar-publishing
1 parent e008965 commit c142c82

File tree

1 file changed

+30
-1
lines changed

1 file changed

+30
-1
lines changed

implementations/spigot/build.gradle.kts

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ plugins {
55
id ("com.github.node-gradle.node") version "3.0.1"
66
id ("com.github.johnrengelman.shadow") version "7.1.2"
77
id ("com.modrinth.minotaur") version "2.+"
8+
id ("io.papermc.hangar-publish-plugin") version "0.0.4"
89
}
910

1011
group = "de.bluecolored.bluemap.bukkit"
@@ -120,7 +121,7 @@ modrinth {
120121
token.set(System.getenv("MODRINTH_TOKEN"))
121122
projectId.set("swbUV1cr")
122123
versionNumber.set("${project.version}-${project.name}")
123-
changelog.set("Releasenotes and Changelog:\nhttps://github.com/BlueMap-Minecraft/BlueMap/releases/tag/v${project.version}")
124+
changelog.set("Releasenotes and Changelog: \nhttps://github.com/BlueMap-Minecraft/BlueMap/releases/tag/v${project.version}")
124125
uploadFile.set(tasks.findByName("shadowJar"))
125126
loaders.addAll("spigot")
126127
gameVersions.addAll(
@@ -134,6 +135,34 @@ modrinth {
134135
)
135136
}
136137

138+
hangarPublish {
139+
publications.register("plugin") {
140+
version.set(project.version as String)
141+
namespace("Blue", "BlueMap")
142+
channel.set("Release")
143+
changelog.set("Releasenotes and Changelog: \nhttps://github.com/BlueMap-Minecraft/BlueMap/releases/tag/v${project.version}")
144+
145+
apiKey.set(System.getenv("HANGAR_TOKEN"))
146+
147+
// register platforms
148+
platforms {
149+
register(io.papermc.hangarpublishplugin.model.Platforms.PAPER) {
150+
jar.set(tasks.jar.flatMap { it.archiveFile })
151+
platformVersions.set(listOf(
152+
"1.13.2",
153+
"1.14", "1.14.1", "1.14.2", "1.14.3", "1.14.4",
154+
"1.15", "1.15.1", "1.15.2",
155+
"1.16", "1.16.1", "1.16.2", "1.16.3", "1.16.4", "1.16.5",
156+
"1.17", "1.17.1",
157+
"1.18", "1.18.1", "1.18.2",
158+
"1.19", "1.19.1", "1.19.2", "1.19.3", "1.19.4"
159+
))
160+
}
161+
}
162+
}
163+
}
164+
137165
tasks.register("publish") {
138166
dependsOn("modrinth")
167+
dependsOn("publishPluginPublicationsToHangar")
139168
}

0 commit comments

Comments
 (0)