From 7ff127a901e906213eb5101db1a1b1fdbb81c1c5 Mon Sep 17 00:00:00 2001 From: dhyces <10985914+dhyces@users.noreply.github.com> Date: Wed, 13 Nov 2024 13:28:57 -0500 Subject: [PATCH] Fix automated upload --- fabric/build.gradle | 18 +++++++++--------- neo/build.gradle | 20 ++++++++++---------- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/fabric/build.gradle b/fabric/build.gradle index 7f487c3..55cbe2e 100644 --- a/fabric/build.gradle +++ b/fabric/build.gradle @@ -103,17 +103,17 @@ tasks.named("compileJava", JavaCompile) { if (hasProperty("modrinth_write_version_pat")) { modrinth { token = findProperty("modrinth_write_version_pat") as String - projectId = properties["modrinth_project_id"] as String - versionName = "Fabric-${libs.versions.minecraft.release.get()}-${properties["mod_version"]}" - versionNumber = "${libs.versions.minecraft.release.get()}-${properties["mod_version"]}+fabric" - versionType = properties["publish_type"] as String + projectId = modrinth_project_id + versionName = "Fabric-${libs.versions.minecraft.release.get()}-${version}" + versionNumber = "${libs.versions.minecraft.release.get()}-${version}+fabric" + versionType = publish_type uploadFile.set(tasks.remapJar) gameVersions = List.of(libs.versions.publish.range.get().split(",")) loaders = List.of("fabric") changelog = rootProject.file("changelog.md").text additionalFiles = List.of(tasks.named("sourcesJar"), tasks.named("javadocJar")) detectLoaders = false - debugMode = properties["publish_debug"].toString().toBoolean() + debugMode = publish_debug.toBoolean() } } @@ -123,16 +123,16 @@ if (hasProperty("curseforge_publishing_token")) { disableVersionDetection() apiToken = findProperty("curseforge_publishing_token") - def projectId = properties["curseforge_project_id"] + def projectId = curseforge_project_id def mainFile = upload(projectId, tasks.remapJar) - mainFile.displayName = "Fabric-${libs.versions.minecraft.release.get()}-${properties["mod_version"]}" - mainFile.releaseType = properties["publish_type"] + mainFile.displayName = "Fabric-${libs.versions.minecraft.release.get()}-${version}" + mainFile.releaseType = publish_type mainFile.changelog = rootProject.file("changelog.md").text mainFile.changelogType = "markdown" mainFile.addModLoader("Fabric") mainFile.addJavaVersion("Java ${java.toolchain.languageVersion.get()}") mainFile.addGameVersion(libs.versions.minecraft.release.get()) - debugMode = properties["publish_debug"].toString().toBoolean() + debugMode = publish_debug.toBoolean() dependsOn(tasks.remapJar) } diff --git a/neo/build.gradle b/neo/build.gradle index dc18227..d0b6f53 100644 --- a/neo/build.gradle +++ b/neo/build.gradle @@ -103,17 +103,17 @@ tasks.named("compileJava", JavaCompile) { if (hasProperty("modrinth_write_version_pat")) { modrinth { token = findProperty("modrinth_write_version_pat") as String - projectId = properties["modrinth_project_id"] as String - versionName = "Fabric-${libs.versions.minecraft.release.get()}-${properties["mod_version"]}" - versionNumber = "${libs.versions.minecraft.release.get()}-${properties["mod_version"]}+neoforge" - versionType = properties["publish_type"] as String + projectId = modrinth_project_id + versionName = "Fabric-${libs.versions.minecraft.release.get()}-${version}" + versionNumber = "${libs.versions.minecraft.release.get()}-${version}+neoforge" + versionType = publish_type uploadFile.set(tasks.jar) gameVersions = List.of(libs.versions.publish.range.get().split(",")) loaders = List.of("neoforge") changelog = rootProject.file("changelog.md").text additionalFiles = List.of(tasks.named("sourcesJar"), tasks.named("javadocJar")) detectLoaders = false - debugMode = properties["publish_debug"].toString().toBoolean() + debugMode = publish_debug.toBoolean() } } @@ -123,17 +123,17 @@ if (hasProperty("curseforge_publishing_token")) { disableVersionDetection() apiToken = findProperty("curseforge_publishing_token") - def projectId = properties["curseforge_project_id"] + def projectId = curseforge_project_id def mainFile = upload(projectId, tasks.jar) - mainFile.displayName = "NeoForge-${libs.versions.minecraft.release.get()}-${properties["mod_version"]}" - mainFile.releaseType = properties["publish_type"] + mainFile.displayName = "NeoForge-${libs.versions.minecraft.release.get()}-${version}" + mainFile.releaseType = publish_type mainFile.changelog = rootProject.file("changelog.md").text mainFile.changelogType = "markdown" mainFile.addModLoader("NeoForge") mainFile.addJavaVersion("Java ${java.toolchain.languageVersion.get()}") mainFile.addGameVersion(libs.versions.minecraft.release.get()) - debugMode = properties["publish_debug"].toString().toBoolean() + debugMode = publish_debug.toBoolean() - dependsOn(tasks.remapJar) + dependsOn(tasks.jar) } } \ No newline at end of file