From 2039c4dc41d2e2422ebec1138af92c5f20e60acd Mon Sep 17 00:00:00 2001 From: ljfa Date: Fri, 4 Aug 2023 07:57:40 +0200 Subject: [PATCH] Add Minotaur gradle plugin for Modrinth uploading --- build.gradle | 15 ++++++++++++++- gradle.properties | 1 + 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index edc17068..24ab50a5 100644 --- a/build.gradle +++ b/build.gradle @@ -4,6 +4,7 @@ plugins { id 'net.minecraftforge.gradle' version '5.1.+' id 'org.parchmentmc.librarian.forgegradle' version '1.+' id 'net.darkhax.curseforgegradle' version '1.1.15' + id 'com.modrinth.minotaur' version '2.+' } version = mod_version @@ -126,7 +127,7 @@ task publishCurseForge(type: net.darkhax.curseforgegradle.TaskPublishCurseForge) apiToken = findProperty('curseForgeApiKey') def mainFile = upload(237541, jar) - mainFile.releaseType = 'beta' + mainFile.releaseType = mod_release_type mainFile.changelog = file('changelog.md') mainFile.changelogType = 'markdown' mainFile.addRequirement('patchouli') @@ -134,6 +135,18 @@ task publishCurseForge(type: net.darkhax.curseforgegradle.TaskPublishCurseForge) def apiSrcFile = mainFile.withAdditionalFile(apiSrcJar) } +modrinth { + token = findProperty('modrinthApiToken') + projectId = 'fenns_totemic' + versionType = mod_release_type + uploadFile = jar + changelog = file('changelog.md').text + dependencies { + required.project 'patchouli' + } + additionalFiles = [apiSrcJar] +} + publishing { publications { mavenJava(MavenPublication) { diff --git a/gradle.properties b/gradle.properties index 749cc2fa..1698f54d 100644 --- a/gradle.properties +++ b/gradle.properties @@ -9,3 +9,4 @@ forge_version=1.19.2-43.2.0 # Remember to change the dependency versions in src/main/resources/META-INF/mods.toml when changing this mod_version=1.19.2-0.12.7 +mod_release_type=beta