@@ -17,7 +17,10 @@ def niceWurstRaw =
1717def niceWurstEnabled = ! [" 0" , " false" , " off" , " no" , " " ]
1818 .contains(niceWurstRaw. toLowerCase(Locale . ROOT ))
1919
20- def effectiveVersion = project. mod_version
20+ def forkReleaseVersion =
21+ (project. findProperty(" fork_release_version" ) ?: " 0.0" ). toString()
22+ def effectiveVersion = niceWurstEnabled ? forkReleaseVersion
23+ : project. mod_version + " -r" + forkReleaseVersion
2124def effectiveArchiveName =
2225 niceWurstEnabled ? " NiceWurst" : project. archives_base_name
2326def modId = niceWurstEnabled ? " nicewurst" : " wurst"
@@ -34,8 +37,6 @@ def issuesUrl =
3437
3538version = effectiveVersion
3639group = project. maven_group
37- def forkReleaseVersion =
38- (project. findProperty(" fork_release_version" ) ?: " 0.0" ). toString()
3940
4041def mainModId = niceWurstEnabled ? " nicewurst" : " wurst"
4142
@@ -185,14 +186,18 @@ tasks.named("runClientGameTestWithMods") {
185186}
186187
187188processResources {
188- def modVersion = project. version. substring(1 )
189+ def rawVersion = project. version. toString()
190+ def modVersion = rawVersion. startsWith(" v" ) ? rawVersion. substring(1 )
191+ : rawVersion
189192 inputs. property(" version" , modVersion)
190193 inputs. property(" modName" , modName)
191194 inputs. property(" modDescription" , modDescription)
192195 inputs. property(" homepageUrl" , homepageUrl)
193196 inputs. property(" sourcesUrl" , sourcesUrl)
194197 inputs. property(" issuesUrl" , issuesUrl)
195198 inputs. property(" modId" , modId)
199+ def modrinthProjectId = niceWurstEnabled ? " V5aiZX0p" : " "
200+ inputs. property(" modrinthProjectId" , modrinthProjectId)
196201
197202 filesMatching(" fabric.mod.json" ) {
198203 expand([
@@ -202,7 +207,8 @@ processResources {
202207 modDescription : modDescription,
203208 homepage : homepageUrl,
204209 sources : sourcesUrl,
205- issues : issuesUrl
210+ issues : issuesUrl,
211+ modrinthProjectId : modrinthProjectId
206212 ])
207213 }
208214}
0 commit comments