diff --git a/CHANGELOG.md b/CHANGELOG.md index 5139d31..e69de29 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,14 +0,0 @@ -- data driving for rainglow modes - - modes are loaded from json through a server datapack - - when joining a server that has modes unknown to the client, they will be sent over - - modes define a text colour, an id, and a list of colours - -- config sync - - config sync can be toggled on and off through config - - when enabled, the client will send its config to the server on join - - the client cannot edit their config while in a server, either through the file or the screen - - this mode can be default, custom-defined through json, or even the builtin "custom" mode - - the client's config is reset when leaving the server - -- improvements to config parser -- stability improvements to data tracker registration \ No newline at end of file diff --git a/build.gradle b/build.gradle index 68c2498..ae5b7be 100644 --- a/build.gradle +++ b/build.gradle @@ -1,7 +1,7 @@ plugins { id "fabric-loom" version "1.6.+" id "com.github.johnrengelman.shadow" version "7.1.+" - id "com.modrinth.minotaur" version "2.+" + id "me.modmuss50.mod-publish-plugin" version "0.5.2" } version = project.mod_version @@ -56,26 +56,44 @@ loom { accessWidenerPath = file("src/main/resources/rainglow.accesswidener") } -//modrinth { -// syncBodyFrom = rootProject.file("README.md").text -// changelog = rootProject.file("CHANGELOG.md").text -// System.out.println("Enter your Modrinth API key: ") -// BufferedReader br = new BufferedReader(new InputStreamReader(System.in)) -// token = br.readLine() -// projectId = "rainglow" -// versionNumber = project.version -// versionName = "rainglow " + project.version.toString().split("\\+")[0] + " for mc " + project.version.toString().split("\\+mc")[1] -// versionType = "release" -// uploadFile = remapJar -// gameVersions = ["1.19", "1.19.1", "1.19.2"] -// loaders = ["quilt", "fabric"] -// dependencies { -// optional.project "modmenu" -// } -// -// // sync readme -// tasks.modrinth.dependsOn(tasks.modrinthSyncBody) -//} +publishMods { + displayName = "rainglow ${project.version}" + file = remapJar.archiveFile + changelog = rootProject.file("CHANGELOG.md").getText() + type = STABLE + + modLoaders.add("quilt") + modLoaders.add("fabric") + + dryRun = !providers.environmentVariable("MODRINTH_TOKEN").isPresent() + || !providers.environmentVariable("CURSEFORGE_TOKEN").isPresent() + || property("pub.should_publish") == "false" + dryRun = false + + var mcVersions = [project.minecraft_version] + mcVersions.addAll(property("pub.additional_versions").toString().split(" ").findAll { !it.empty }) + + modrinth { + projectId = "Bk6pUD7R" + accessToken = providers.environmentVariable("MODRINTH_TOKEN") + mcVersions.forEach(minecraftVersions::add) + + requires "fabric-api" + optional "modmenu" + } + + curseforge { + accessToken = providers.environmentVariable("CURSEFORGE_TOKEN") + projectId = "576755" + mcVersions.forEach(minecraftVersions::add) + + clientRequired = true + serverRequired = false + + requires("fabric-api") + optional("modmenu") + } +} def targetJavaVersion = Integer.parseInt(project.java_version) tasks.withType(JavaCompile).configureEach { diff --git a/gradle.properties b/gradle.properties index 8114d36..0fd3931 100644 --- a/gradle.properties +++ b/gradle.properties @@ -17,3 +17,6 @@ archives_base_name=rainglow java_version=21 mod_menu_version=11.0.1 fabric_api_version=0.102.0+1.21.1 + +pub.should_publish = true +pub.additional_versions = 1.21 \ No newline at end of file