Skip to content

Commit f0f7af1

Browse files
committed
another, another attempt at both making github workflows not stupid and having the build file do what it is supposed to do
1 parent bbbc737 commit f0f7af1

File tree

1 file changed

+19
-17
lines changed

1 file changed

+19
-17
lines changed

build.gradle

+19-17
Original file line numberDiff line numberDiff line change
@@ -184,23 +184,25 @@ publishing {
184184
}
185185
}
186186

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+
}
204206
}
205207
}
206208

0 commit comments

Comments
 (0)