Skip to content

Commit 5a7c11b

Browse files
committed
Fix inverted check
1 parent 046e291 commit 5a7c11b

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

build.gradle.kts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,9 +176,14 @@ dependencies {
176176
val modrinthId = findProperty("publish.modrinth")?.toString()?.takeIf { it.isNotBlank() }
177177
val curseforgeId = findProperty("publish.curseforge")?.toString()?.takeIf { it.isNotBlank() }
178178

179+
// accessTokens should be placed in the user Gradle gradle.properties file
180+
// for example, on Windows this would be "C:\Users\{user}\.gradle\gradle.properties"
181+
// then add:
182+
// modrinth.token=
183+
// curseforge.token=
179184
publishMods {
180185
file =
181-
(if (mod.obfuscated) tasks.jar else tasks.named<net.fabricmc.loom.task.RemapJarTask>("remapJar")).flatMap { it.archiveFile }
186+
(if (mod.obfuscated) tasks.named<net.fabricmc.loom.task.RemapJarTask>("remapJar") else tasks.jar).flatMap { it.archiveFile }
182187

183188
val niceVersionRangeTitle = if (mod.minecraftVersionRange.contains(' ')) {
184189
val parts = mod.minecraftVersionRange.trim().split(' ')
@@ -188,7 +193,7 @@ publishMods {
188193
}
189194

190195
displayName = "Release ${mod.version} for $niceVersionRangeTitle"
191-
this.version = mod.version
196+
version = mod.version
192197
changelog = project.rootProject.file("CHANGELOG.md").takeIf { it.exists() }?.readText() ?: "No changelog provided."
193198
type = STABLE
194199

0 commit comments

Comments
 (0)