We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 14a9e2a commit d03dcb8Copy full SHA for d03dcb8
1 file changed
build.gradle
@@ -103,6 +103,23 @@ tasks.withType(JavaCompile).configureEach {
103
it.options.release = 21
104
}
105
106
+tasks.register("verifyTagMatchesVersion") {
107
+ doLast {
108
+ def tag = project.findProperty("tag")?.toString()
109
+ def version = project.findProperty("mod_version")?.toString()
110
+
111
+ if (tag == null || version == null) {
112
+ throw new GradleException("Missing tag or mod_version.")
113
+ }
114
115
+ if (tag != version) {
116
+ throw new GradleException("Tag ($tag) does not match mod_version ($version)")
117
118
119
+ println "✅ Tag matches mod_version: $version"
120
121
+}
122
123
java {
124
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
125
// if it is present.
0 commit comments