From 36a2bd23a6d7fa9627073e2fc22ebeee2a423411 Mon Sep 17 00:00:00 2001 From: alexcrea <42614139+alexcrea@users.noreply.github.com> Date: Sat, 14 Jun 2025 13:47:20 +0200 Subject: [PATCH] use small hash for effective plugin version --- build.gradle.kts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 63d5673..e829958 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -18,6 +18,9 @@ plugins { group = "xyz.alexcrea" version = "1.11.3" +val effectiveVersion = "$version" + + {(if(project.hasProperty("smallCommitHash")) "-${project.property("smallCommitHash")}" else "")} + repositories { // EcoEnchants maven(url = "https://repo.auxilor.io/repository/maven-public/") @@ -135,7 +138,8 @@ val fatJar = tasks.register("fatJar") { manifest { attributes.apply { put("Main-Class", "io.delilaheve.CustomAnvil") } } - archiveFileName.set("${rootProject.name}-${project.version}.jar") + + archiveFileName.set("${rootProject.name}-${effectiveVersion}.jar") exclude("META-INF/*.RSA", "META-INF/*.SF", "META-INF/*.DSA") duplicatesStrategy = DuplicatesStrategy.WARN from(configurations.runtimeClasspath.get().map { if (it.isDirectory) it else zipTree(it) }) @@ -158,7 +162,7 @@ tasks { // Replace version and example fields in plugin.yml filesMatching("plugin.yml") { expand( - "version" to project.version, + "version" to effectiveVersion, "libraries" to " \"org.jetbrains.kotlin:kotlin-stdlib:2.1.0\" " ) } @@ -183,7 +187,7 @@ tasks { filesMatching("plugin.yml") { expand( - "version" to "${project.version}-offline", + "version" to "$effectiveVersion-offline", "libraries" to "" ) }