Skip to content

Commit

Permalink
new publishing setup
Browse files Browse the repository at this point in the history
  • Loading branch information
ix0rai committed Aug 24, 2024
1 parent b4f933a commit 30f8ac7
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 35 deletions.
14 changes: 0 additions & 14 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
60 changes: 39 additions & 21 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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 {
Expand Down
3 changes: 3 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 30f8ac7

Please sign in to comment.