@@ -184,23 +184,25 @@ publishing {
184
184
}
185
185
}
186
186
187
- modrinth {
188
- token = hasProperty(" modrinthToken" ) ? modrinthToken : null
189
- projectId = " halplibe" // This can be the project ID or the slug. Either will work!
190
- versionName = " HalpLibe ${ project.mod_version} "
191
- versionNumber = project. mod_version // You don't need to set this manually. Will fail if Modrinth has this version already
192
- versionType = " release" // This is the default -- can also be `beta` or `alpha`
193
- uploadFile = remapJar // With Loom, this MUST be set to `remapJar` instead of `jar`!
194
- additionalFiles = [remapSourcesJar]
195
- gameVersions = [" b1.7.3" ] // Must be an array, even with only one version
196
- loaders = [" fabric" ] // Must also be an array - no need to specify this if you're using Loom or ForgeGradle
197
- changelog = Files . readString(java.nio.file.Path . of(" ${ rootProject.projectDir} /CHANGELOG.md" ))
198
- dependencies { // A special DSL for creating dependencies
199
- // scope.type
200
- // The scope can be `required`, `optional`, `incompatible`, or `embedded`
201
- // The type can either be `project` or `version`
202
- // required.project "fabric-api" // Creates a new required dependency on Fabric API
203
- // optional.version "sodium", "mc1.19.3-0.4.8" // Creates a new optional dependency on this specific version of Sodium
187
+ if (hasProperty(" modrinthToken" )){
188
+ modrinth {
189
+ token = modrinthToken
190
+ projectId = " halplibe" // This can be the project ID or the slug. Either will work!
191
+ versionName = " HalpLibe ${ project.mod_version} "
192
+ versionNumber = project. mod_version // You don't need to set this manually. Will fail if Modrinth has this version already
193
+ versionType = " release" // This is the default -- can also be `beta` or `alpha`
194
+ uploadFile = remapJar // With Loom, this MUST be set to `remapJar` instead of `jar`!
195
+ additionalFiles = [remapSourcesJar]
196
+ gameVersions = [" b1.7.3" ] // Must be an array, even with only one version
197
+ loaders = [" fabric" ] // Must also be an array - no need to specify this if you're using Loom or ForgeGradle
198
+ changelog = Files . readString(java.nio.file.Path . of(" ${ rootProject.projectDir} /CHANGELOG.md" ))
199
+ dependencies { // A special DSL for creating dependencies
200
+ // scope.type
201
+ // The scope can be `required`, `optional`, `incompatible`, or `embedded`
202
+ // The type can either be `project` or `version`
203
+ // required.project "fabric-api" // Creates a new required dependency on Fabric API
204
+ // optional.version "sodium", "mc1.19.3-0.4.8" // Creates a new optional dependency on this specific version of Sodium
205
+ }
204
206
}
205
207
}
206
208
0 commit comments