From 272195593122966b57b69a5d413e12002bf7e075 Mon Sep 17 00:00:00 2001 From: FlorianMichael <60033407+FlorianMichael@users.noreply.github.com> Date: Sun, 28 Apr 2024 21:30:43 +0200 Subject: [PATCH] Add mod publish plugin --- CHANGELOG.md | 2 ++ build.gradle | 23 +++++++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..e655995 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,2 @@ +- Updated Via* projects to support 1.20.5 +- Fixed version in 1.12 mcmod.info file \ No newline at end of file diff --git a/build.gradle b/build.gradle index d906eb9..7f3a3b7 100644 --- a/build.gradle +++ b/build.gradle @@ -11,12 +11,14 @@ buildscript { classpath "com.github.johnrengelman:shadow:7.1.2" classpath "net.minecraftforge.gradle:ForgeGradle:6.+" classpath "org.spongepowered:mixingradle:0.7-SNAPSHOT" + classpath "me.modmuss50:mod-publish-plugin:0.5.1" } } allprojects { apply plugin: "java-library" apply plugin: "com.github.johnrengelman.shadow" + apply plugin: "me.modmuss50.mod-publish-plugin" // We define the configuration here so we can use it across all conventions and platforms // To define which projects/source files should be included in the jar @@ -173,6 +175,27 @@ subprojects { } } + publishMods { + file = shadowJar.archiveFile + type = STABLE + displayName = rootProject.name + ' ' + project.version + version = project.version + "+" + project.mc_version + modLoaders.add("forge") + changelog = file("../CHANGELOG.md").text + dryRun = rootProject.maven_version.contains("SNAPSHOT") + + curseforge { + accessToken = providers.gradleProperty("curseforge.publishing_token") + projectId = "418933" + minecraftVersions.addAll(project.mc_version.split(',')) + } + modrinth { + accessToken = providers.gradleProperty("modrinth.publishing_token") + projectId = "Z6se2s8f" + minecraftVersions.addAll(project.mc_version.split(',')) + } + } + reobf { shadowJar {} }