Skip to content

Commit

Permalink
ci: gradle stack overflow fix
Browse files Browse the repository at this point in the history
  • Loading branch information
rxchard committed Dec 11, 2024
1 parent c04430f commit 02351c2
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions Publication/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,19 @@ var plugin = project(":Plugin")
// com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar ext org.gradle.api.tasks.bundling.Jar
var shadowJar = plugin.tasks.named<Jar>("shadowJar")

var version = plugin.version as String
var channel = System.getenv("HANGAR_PUB_CHANNEL")

if (channel == "Preview") {
version = version + "+" + System.getenv("HANGAR_SHORTY")
var gversion = plugin.version as String
var gchannel = System.getenv("HANGAR_PUB_CHANNEL")
if (gchannel == "Preview") {
gversion = gversion + "+" + System.getenv("HANGAR_SHORTY")
}

hangarPublish {
publications.register("plugin") {
apiKey.set(System.getenv("HANGAR_API_TOKEN"))
id.set(System.getenv("HANGAR_ID"))
channel.set(channel)
channel.set(gchannel)
changelog.set(System.getenv("HANGAR_PUB_CHANGELOG"))
version.set(version)
version.set(gversion)
platforms {
register(Platforms.PAPER) {
jar.set(shadowJar.flatMap { it.archiveFile })
Expand Down

0 comments on commit 02351c2

Please sign in to comment.