fancyholograms: update versioning and refactor version retrieval method

This commit is contained in:
Oliver
2025-03-15 19:49:44 +01:00
parent b648e86ace
commit 04a861562e
4 changed files with 16 additions and 9 deletions

View File

@@ -1,4 +1,3 @@
fancyhologramsVersion=2.4.2
fancyvisualsVersion=0.0.1
fancylibVersion=36
fancysitulaVersion=0.0.13

View File

@@ -1 +1 @@
2.4.2
3.0.0-SNAPSHOT.1

View File

@@ -48,7 +48,7 @@ tasks {
create<MavenPublication>("maven") {
groupId = "de.oliver"
artifactId = "FancyHolograms"
version = findProperty("fancyhologramsVersion") as String
version = getFHVersion()
from(project.components["java"])
}
}
@@ -69,3 +69,7 @@ tasks {
options.release.set(17)
}
}
fun getFHVersion(): String {
return file("../VERSION").readText()
}

View File

@@ -33,7 +33,7 @@ val supportedVersions =
allprojects {
group = "de.oliver"
version = findProperty("fancyhologramsVersion") as String
version = getFHVersion()
description = "Simple, lightweight and fast hologram plugin using display entities"
repositories {
@@ -78,7 +78,7 @@ paper {
bootstrapper = "de.oliver.fancyholograms.main.FancyHologramsBootstrapper"
loader = "de.oliver.fancyholograms.main.FancyHologramsLoader"
foliaSupported = true
version = findProperty("fancyhologramsVersion") as String
version = getFHVersion()
description = "Simple, lightweight and fast hologram plugin using display entities"
apiVersion = "1.19"
load = BukkitPluginDescription.PluginLoadOrder.POSTWORLD
@@ -141,7 +141,7 @@ tasks {
val props = mapOf(
"description" to project.description,
"version" to findProperty("fancyhologramsVersion") as String,
"version" to getFHVersion(),
"hash" to getCurrentCommitHash(),
)
@@ -177,9 +177,13 @@ fun getLastCommitMessage(): String {
return ""
}
fun getFHVersion(): String {
return file("VERSION").readText()
}
hangarPublish {
publications.register("plugin") {
version = findProperty("fancyhologramsVersion") as String
version = getFHVersion()
id = "FancyHolograms"
channel = "Alpha"
@@ -199,9 +203,9 @@ hangarPublish {
modrinth {
token.set(System.getenv("MODRINTH_PUBLISH_API_TOKEN"))
projectId.set("fancyholograms")
versionNumber.set(findProperty("fancyhologramsVersion") as String)
versionNumber.set(getFHVersion())
versionType.set("alpha")
uploadFile.set(file("build/libs/FancyHolograms-${findProperty("fancyhologramsVersion") as String}.jar"))
uploadFile.set(file("build/libs/FancyHolograms-${getFHVersion()}.jar"))
gameVersions.addAll(supportedVersions)
loaders.add("paper")
loaders.add("folia")