diff --git a/gradle.properties b/gradle.properties index d42fbb62..a2b8c598 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,3 @@ -fancyhologramsVersion=2.4.2 fancyvisualsVersion=0.0.1 fancylibVersion=36 fancysitulaVersion=0.0.13 diff --git a/plugins/fancyholograms/VERSION b/plugins/fancyholograms/VERSION index acdc3f1b..c83970f3 100644 --- a/plugins/fancyholograms/VERSION +++ b/plugins/fancyholograms/VERSION @@ -1 +1 @@ -2.4.2 \ No newline at end of file +3.0.0-SNAPSHOT.1 \ No newline at end of file diff --git a/plugins/fancyholograms/api/build.gradle.kts b/plugins/fancyholograms/api/build.gradle.kts index 44cb941f..a6e8db22 100644 --- a/plugins/fancyholograms/api/build.gradle.kts +++ b/plugins/fancyholograms/api/build.gradle.kts @@ -48,7 +48,7 @@ tasks { create("maven") { groupId = "de.oliver" artifactId = "FancyHolograms" - version = findProperty("fancyhologramsVersion") as String + version = getFHVersion() from(project.components["java"]) } } @@ -68,4 +68,8 @@ tasks { options.release.set(17) } +} + +fun getFHVersion(): String { + return file("../VERSION").readText() } \ No newline at end of file diff --git a/plugins/fancyholograms/build.gradle.kts b/plugins/fancyholograms/build.gradle.kts index e3d6fab9..e91a7853 100644 --- a/plugins/fancyholograms/build.gradle.kts +++ b/plugins/fancyholograms/build.gradle.kts @@ -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")