@@ -17,6 +17,8 @@ def niceWurstRaw =
1717def niceWurstEnabled = ! [" 0" , " false" , " off" , " no" , " " ]
1818 .contains(niceWurstRaw. toLowerCase(Locale . ROOT ))
1919
20+ def forkReleaseVersion =
21+ (project. findProperty(" fork_release_version" ) ?: " 0.0" ). toString()
2022def effectiveVersion = project. mod_version
2123def effectiveArchiveName =
2224 niceWurstEnabled ? " NiceWurst" : project. archives_base_name
@@ -34,8 +36,6 @@ def issuesUrl =
3436
3537version = effectiveVersion
3638group = project. maven_group
37- def forkReleaseVersion =
38- (project. findProperty(" fork_release_version" ) ?: " 0.0" ). toString()
3939
4040def mainModId = niceWurstEnabled ? " nicewurst" : " wurst"
4141
@@ -185,14 +185,18 @@ tasks.named("runClientGameTestWithMods") {
185185}
186186
187187processResources {
188- def modVersion = project. version. substring(1 )
188+ def rawVersion = project. version. toString()
189+ def modVersion = niceWurstEnabled ? forkReleaseVersion
190+ : (rawVersion. startsWith(" v" ) ? rawVersion. substring(1 ) : rawVersion)
189191 inputs. property(" version" , modVersion)
190192 inputs. property(" modName" , modName)
191193 inputs. property(" modDescription" , modDescription)
192194 inputs. property(" homepageUrl" , homepageUrl)
193195 inputs. property(" sourcesUrl" , sourcesUrl)
194196 inputs. property(" issuesUrl" , issuesUrl)
195197 inputs. property(" modId" , modId)
198+ def modrinthProjectId = niceWurstEnabled ? " V5aiZX0p" : " "
199+ inputs. property(" modrinthProjectId" , modrinthProjectId)
196200
197201 filesMatching(" fabric.mod.json" ) {
198202 expand([
@@ -202,7 +206,8 @@ processResources {
202206 modDescription : modDescription,
203207 homepage : homepageUrl,
204208 sources : sourcesUrl,
205- issues : issuesUrl
209+ issues : issuesUrl,
210+ modrinthProjectId : modrinthProjectId
206211 ])
207212 }
208213}
0 commit comments