Skip to content

Commit

Permalink
build: set paper version at top level
Browse files Browse the repository at this point in the history
  • Loading branch information
kernitus committed Oct 20, 2024
1 parent c32540f commit 684e481
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
import io.papermc.hangarpublishplugin.model.Platforms
import java.io.ByteArrayOutputStream

val paperVersion: List<String> = (property("gameVersions") as String)
.split(",")
.map { it.trim() }


plugins {
`java-library`
id("com.github.johnrengelman.shadow") version "8.1.1"
Expand Down Expand Up @@ -160,12 +165,7 @@ hangarPublish {
platforms {
register(Platforms.PAPER) {
jar.set(tasks.shadowJar.flatMap { it.archiveFile })

val versions: List<String> = (property("gameVersion") as String)
.split(",")
.map { it.trim() }

platformVersions.set(versions)
platformVersions.set(paperVersion)
}
}
}
Expand Down

0 comments on commit 684e481

Please sign in to comment.