From 92be8f419df37e9df0d5f1b9b6cb299500b79d47 Mon Sep 17 00:00:00 2001 From: Oliver Date: Fri, 14 Mar 2025 18:01:23 +0100 Subject: [PATCH] Update FancyHolograms versioning and dependencies --- gradle.properties | 2 + plugins/fancyholograms/api/build.gradle.kts | 6 +-- plugins/fancyholograms/build.gradle.kts | 52 +++------------------ 3 files changed, 12 insertions(+), 48 deletions(-) diff --git a/gradle.properties b/gradle.properties index 3620c405..b0dc383a 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,3 +1,5 @@ +fancyhologramsVersion=2.4.2 + org.gradle.parallel=true org.gradle.caching=true org.gradle.configuration-cache=true \ No newline at end of file diff --git a/plugins/fancyholograms/api/build.gradle.kts b/plugins/fancyholograms/api/build.gradle.kts index 31c75233..b24c540b 100644 --- a/plugins/fancyholograms/api/build.gradle.kts +++ b/plugins/fancyholograms/api/build.gradle.kts @@ -46,9 +46,9 @@ tasks { } publications { create("maven") { - groupId = rootProject.group.toString() - artifactId = rootProject.name - version = rootProject.version.toString() + groupId = "de.oliver" + artifactId = "fancyholograms" + version = findProperty("fancyhologramsVersion") as String from(project.components["java"]) } } diff --git a/plugins/fancyholograms/build.gradle.kts b/plugins/fancyholograms/build.gradle.kts index b1c591b9..9eb095f0 100644 --- a/plugins/fancyholograms/build.gradle.kts +++ b/plugins/fancyholograms/build.gradle.kts @@ -35,8 +35,7 @@ val supportedVersions = allprojects { group = "de.oliver" - val buildId = System.getenv("BUILD_ID") - version = "2.4.2" + (if (buildId != null) ".$buildId" else "") + version = findProperty("fancyhologramsVersion") as String description = "Simple, lightweight and fast hologram plugin using display entities" repositories { @@ -72,7 +71,7 @@ dependencies { compileOnly("de.oliver:FancyNpcs:2.4.2") compileOnly("org.lushplugins:ChatColorHandler:5.1.2") - compileOnly("com.viaversion:viaversion-api:5.2.0") + compileOnly("com.viaversion:viaversion-api:5.2.1") compileOnly("org.geysermc.floodgate:api:2.2.4-SNAPSHOT") } @@ -81,7 +80,7 @@ paper { bootstrapper = "de.oliver.fancyholograms.main.FancyHologramsBootstrapper" loader = "de.oliver.fancyholograms.main.FancyHologramsLoader" foliaSupported = true - version = rootProject.version.toString() + version = findProperty("fancyhologramsVersion") as String description = "Simple, lightweight and fast hologram plugin using display entities" apiVersion = "1.19" load = BukkitPluginDescription.PluginLoadOrder.POSTWORLD @@ -131,38 +130,6 @@ tasks { dependsOn(":plugins:fancyholograms:api:shadowJar") } - publishing { - repositories { - maven { - name = "fancypluginsReleases" - url = uri("https://repo.fancyplugins.de/releases") - credentials(PasswordCredentials::class) - authentication { - isAllowInsecureProtocol = true - create("basic") - } - } - - maven { - name = "fancypluginsSnapshots" - url = uri("https://repo.fancyplugins.de/snapshots") - credentials(PasswordCredentials::class) - authentication { - isAllowInsecureProtocol = true - create("basic") - } - } - } - publications { - create("maven") { - groupId = project.group.toString() - artifactId = project.name - version = project.version.toString() - from(project.components["java"]) - } - } - } - compileJava { options.encoding = Charsets.UTF_8.name() // We want UTF-8 for everything options.release = 21 @@ -170,18 +137,13 @@ tasks { options.compilerArgs.add("-parameters") } - javadoc { - options.encoding = Charsets.UTF_8.name() // We want UTF-8 for everything - } - processResources { filteringCharset = Charsets.UTF_8.name() // We want UTF-8 for everything val props = mapOf( "description" to project.description, - "version" to project.version, + "version" to findProperty("fancyhologramsVersion") as String, "hash" to getCurrentCommitHash(), - "build" to (System.getenv("BUILD_ID") ?: "").ifEmpty { "undefined" } ) inputs.properties(props) @@ -218,7 +180,7 @@ fun getLastCommitMessage(): String { hangarPublish { publications.register("plugin") { - version = project.version as String + version = findProperty("fancyhologramsVersion") as String id = "FancyHolograms" channel = "Alpha" @@ -238,9 +200,9 @@ hangarPublish { modrinth { token.set(System.getenv("MODRINTH_PUBLISH_API_TOKEN")) projectId.set("fancyholograms") - versionNumber.set(project.version.toString()) + versionNumber.set(findProperty("fancyhologramsVersion") as String) versionType.set("alpha") - uploadFile.set(file("build/libs/${project.name}-${project.version}.jar")) + uploadFile.set(file("build/libs/FancyHolograms-${findProperty("fancyhologramsVersion") as String}.jar")) gameVersions.addAll(supportedVersions) loaders.add("paper") loaders.add("folia")