From 7e53f55509b1878c5d6594d5fd97bd4f01b40775 Mon Sep 17 00:00:00 2001 From: Nassim Jahnke Date: Fri, 11 Aug 2023 20:33:47 +1000 Subject: [PATCH] Also publish dev branch builds to Hangar --- universal/build.gradle.kts | 40 ++++++++++++++++++-------------------- 1 file changed, 19 insertions(+), 21 deletions(-) diff --git a/universal/build.gradle.kts b/universal/build.gradle.kts index fe799bcda..0ed811d90 100644 --- a/universal/build.gradle.kts +++ b/universal/build.gradle.kts @@ -80,27 +80,25 @@ modrinth { } } -if (isMainBranch) { // Don't spam releases until Hangar has per channel notifications - hangarPublish { - publications.register("plugin") { - version.set(suffixedVersion) - namespace("ViaVersion", "ViaVersion") - channel.set(if (isRelease) "Release" else if (isMainBranch) "Snapshot" else "Alpha") - changelog.set(changelogContent) - apiKey.set(System.getenv("HANGAR_TOKEN")) - platforms { - register(Platforms.PAPER) { - jar.set(tasks.shadowJar.flatMap { it.archiveFile }) - platformVersions.set(listOf(property("mcVersionRange") as String)) - } - register(Platforms.VELOCITY) { - jar.set(tasks.shadowJar.flatMap { it.archiveFile }) - platformVersions.set(listOf(property("velocityVersion") as String)) - } - register(Platforms.WATERFALL) { - jar.set(tasks.shadowJar.flatMap { it.archiveFile }) - platformVersions.set(listOf(property("waterfallVersion") as String)) - } +hangarPublish { + publications.register("plugin") { + version.set(suffixedVersion) + namespace("ViaVersion", "ViaVersion") + channel.set(if (isRelease) "Release" else if (isMainBranch) "Snapshot" else "Alpha") + changelog.set(changelogContent) + apiKey.set(System.getenv("HANGAR_TOKEN")) + platforms { + register(Platforms.PAPER) { + jar.set(tasks.shadowJar.flatMap { it.archiveFile }) + platformVersions.set(listOf(property("mcVersionRange") as String)) + } + register(Platforms.VELOCITY) { + jar.set(tasks.shadowJar.flatMap { it.archiveFile }) + platformVersions.set(listOf(property("velocityVersion") as String)) + } + register(Platforms.WATERFALL) { + jar.set(tasks.shadowJar.flatMap { it.archiveFile }) + platformVersions.set(listOf(property("waterfallVersion") as String)) } } }