From cb4f768dc2e88a06a3eebe89edbcfb4e9e4f66f6 Mon Sep 17 00:00:00 2001 From: NotRyken <127091011+NotRyken@users.noreply.github.com> Date: Fri, 17 Jan 2025 11:24:08 +0800 Subject: [PATCH] Update buildscripts --- build.gradle | 5 +++-- buildSrc/src/main/groovy/multiloader-common.gradle | 2 +- gradle.properties | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/build.gradle b/build.gradle index 79ca52b..b32849d 100644 --- a/build.gradle +++ b/build.gradle @@ -7,6 +7,7 @@ plugins { } subprojects { + mod_version = "${mod_version}+${minecraft_version}" version = mod_version group = mod_group @@ -130,7 +131,7 @@ subprojects { String versionChangelog() { List lines = rootProject.file("CHANGELOG.md").readLines() StringBuilder builder = new StringBuilder() - if ("${mod_version}".startsWith(lines.get(2).substring(3))) { + if ("${mod_version}" == lines.get(2).substring(3)) { for (int i = 4; i < lines.size(); i++) { String line = lines.get(i) if (line.startsWith("## ")) { @@ -142,7 +143,7 @@ String versionChangelog() { } } else { throw new IllegalArgumentException( - String.format("Mod version '%s' does not start with changelog version '%s'", + String.format("Mod version '%s' does not match changelog version '%s'", mod_version, lines.get(2).substring(3))) } return builder.toString() diff --git a/buildSrc/src/main/groovy/multiloader-common.gradle b/buildSrc/src/main/groovy/multiloader-common.gradle index a7d6e12..108daf3 100644 --- a/buildSrc/src/main/groovy/multiloader-common.gradle +++ b/buildSrc/src/main/groovy/multiloader-common.gradle @@ -91,7 +91,7 @@ jar { processResources { def expandProps = [ // Mod info - "mod_version": mod_version, + "mod_version": "${mod_version}+${minecraft_version}", "mod_group": mod_group, "mod_id": mod_id, "mod_name": mod_name, diff --git a/gradle.properties b/gradle.properties index 3027f15..659e22f 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,7 +3,7 @@ # Neo/Forge version ranges: https://maven.apache.org/enforcer/enforcer-rules/versionRanges.html # Project -mod_version=2.0.4+1.21 +mod_version=2.0.4 mod_group=dev.terminalmc mod_id=claimpoints mod_name=ClaimPoints