From 0bb24bea8dbd3e444d9293b837dc7f3fc2d67370 Mon Sep 17 00:00:00 2001 From: "Jill \"oatmealine\" Monoids" Date: Tue, 29 Aug 2023 14:09:49 +0300 Subject: [PATCH] switch to curseforgegradle i originally did this to see if it would fix a 403 error (it did not) but its api is nicer sooooo --- build.gradle | 46 ++++++++++++++++++++++------------------------ 1 file changed, 22 insertions(+), 24 deletions(-) diff --git a/build.gradle b/build.gradle index 0625bf1..40f2a02 100644 --- a/build.gradle +++ b/build.gradle @@ -2,7 +2,7 @@ plugins { id 'fabric-loom' version '1.0-SNAPSHOT' id 'maven-publish' id 'io.github.juuxel.loom-quiltflower' version '1.7.+' - id 'me.hypherionmc.cursegradle' version '2.+' + id 'net.darkhax.curseforgegradle' version '1.+' id "com.modrinth.minotaur" version "2.+" } @@ -100,32 +100,30 @@ publishing { import com.modrinth.minotaur.dependencies.ModDependency -curseforge { +task curseforge(type: net.darkhax.curseforgegradle.TaskPublishCurseForge) { if (!file('./CHANGELOG.md').canRead()) { throw new FileNotFoundException("Could not read changelog file") } - apiKey = project.hasProperty("CURSEFORGE_TOKEN") ? project.CURSEFORGE_TOKEN : "" - project { - id = '699839' - changelog = file('./CHANGELOG.md') - changelogType = 'markdown' - releaseType = 'release' - accepted_minecraft_version.split(",").each { - addGameVersion it.trim() - } - mainArtifact(remapJar) { - displayName = "${mod_version_friendly}" - relations { - requiredDependency 'fabric-api' - requiredDependency 'cloth-config' - optionalDependency 'modmenu' - } - } - } - options { - //debug = true - javaVersionAutoDetect = false - forgeGradleIntegration = false + apiToken = project.hasProperty("CURSEFORGE_TOKEN") ? project.CURSEFORGE_TOKEN : "" + + disableVersionDetection() + + def mainFile = upload('699839', jar) + mainFile.displayName = "${mod_version_friendly}" + mainFile.changelog = file('./CHANGELOG.md') + mainFile.changelogType = 'markdown' + mainFile.releaseType = 'release' + + mainFile.addModLoader('fabric', 'quilt') + + accepted_minecraft_version.split(",").each { + mainFile.addGameVersion it.trim() } + + mainFile.addRelation('fabric-api', 'requiredDependency') + mainFile.addRelation('cloth-config', 'requiredDependency') + mainFile.addRelation('modmenu', 'optionalDependency') + + //debugMode = true } modrinth {