aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build.gradle.kts3
-rw-r--r--fabric/build.gradle.kts71
-rw-r--r--forge/build.gradle.kts71
-rw-r--r--gradle/libs.versions.toml6
4 files changed, 90 insertions, 61 deletions
diff --git a/build.gradle.kts b/build.gradle.kts
index 0daff2c..5ef937b 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -2,7 +2,8 @@ plugins {
alias(libs.plugins.architectury.plugin)
alias(libs.plugins.architectury.loom) apply false
- alias(libs.plugins.unified.publishing) apply false
+ alias(libs.plugins.minotaur) apply false
+ alias(libs.plugins.cursegradle) apply false
alias(libs.plugins.github.release)
alias(libs.plugins.grgit)
}
diff --git a/fabric/build.gradle.kts b/fabric/build.gradle.kts
index 6a4d2d0..224ab21 100644
--- a/fabric/build.gradle.kts
+++ b/fabric/build.gradle.kts
@@ -3,7 +3,8 @@ import org.gradle.jvm.tasks.Jar
plugins {
alias(libs.plugins.architectury.loom)
alias(libs.plugins.shadow)
- alias(libs.plugins.unified.publishing)
+ alias(libs.plugins.minotaur)
+ alias(libs.plugins.cursegradle)
}
architectury {
@@ -111,37 +112,49 @@ components["java"].withGroovyBuilder {
val changelogText: String by ext
-unifiedPublishing {
- project {
- displayName.set("${project.version} (Fabric)")
- releaseType.set("release")
- gameVersions.set(listOf("1.19.3", "1.19.4"))
- gameLoaders.set(listOf("fabric", "quilt"))
+val modrinthId: String by project
+if (modrinthId.isNotEmpty()) {
+ modrinth {
+ token.set(findProperty("modrinth.token")?.toString())
+ projectId.set(modrinthId)
+ versionName.set("${project.version} (Fabric)")
+ versionNumber.set("${project.version}-fabric")
+ versionType.set("release")
+ uploadFile.set(tasks["remapJar"])
+ gameVersions.set(listOf("1.19.4", "1.19.3"))
+ loaders.set(listOf("fabric", "quilt"))
changelog.set(changelogText)
-
- mainPublication(tasks.remapJar.get())
- secondaryPublication(tasks.remapSourcesJar.get().archiveFile)
-
- val modrinthId: String? by rootProject
- if (modrinthId?.isNotEmpty() == true) {
- modrinth {
- token.set(findProperty("modrinth.token")?.toString() ?: "Modrinth publishing token not found")
- id.set(modrinthId)
- version.set("${project.version}-fabric")
- }
- }
-
- val curseforgeId: String? by rootProject
- if (curseforgeId?.isNotEmpty() == true) {
- curseforge {
- token.set(findProperty("curseforge.token")?.toString() ?: "Curseforge publishing token not found")
- id.set(curseforgeId)
- gameVersions.add("Java 17")
- }
- }
+ syncBodyFrom.set(rootProject.file("README.md").readText())
+ }
+}
+rootProject.tasks["releaseMod"].dependsOn(tasks["modrinth"])
+
+val curseforgeId: String by project
+if (hasProperty("curseforge.token") && curseforgeId.isNotEmpty()) {
+ curseforge {
+ apiKey = findProperty("curseforge.token")
+ project(closureOf<me.hypherionmc.cursegradle.CurseProject> {
+ mainArtifact(tasks["remapJar"], closureOf<me.hypherionmc.cursegradle.CurseArtifact> {
+ displayName = "[Fabric] ${project.version}"
+ })
+
+ id = curseforgeId
+ releaseType = "release"
+ addGameVersion("1.19.4")
+ addGameVersion("1.19.3")
+ addGameVersion("Fabric")
+ addGameVersion("Java 17")
+
+ changelog = changelogText
+ changelogType = "markdown"
+ })
+
+ options(closureOf<me.hypherionmc.cursegradle.Options> {
+ forgeGradleIntegration = false
+ })
}
}
-rootProject.tasks["releaseMod"].dependsOn(tasks["publishUnified"])
+rootProject.tasks["releaseMod"].dependsOn(tasks["curseforge"])
publishing {
publications {
diff --git a/forge/build.gradle.kts b/forge/build.gradle.kts
index 5ba9450..3ddcabc 100644
--- a/forge/build.gradle.kts
+++ b/forge/build.gradle.kts
@@ -3,7 +3,8 @@ import org.gradle.jvm.tasks.Jar
plugins {
alias(libs.plugins.architectury.loom)
alias(libs.plugins.shadow)
- alias(libs.plugins.unified.publishing)
+ alias(libs.plugins.minotaur)
+ alias(libs.plugins.cursegradle)
}
architectury {
@@ -117,37 +118,49 @@ components["java"].withGroovyBuilder {
val changelogText: String by ext
-unifiedPublishing {
- project {
- displayName.set("${project.version} (Forge)")
- releaseType.set("release")
- gameVersions.set(listOf("1.19.3", "1.19.4"))
- gameLoaders.set(listOf("forge"))
+val modrinthId: String by project
+if (modrinthId.isNotEmpty()) {
+ modrinth {
+ token.set(findProperty("modrinth.token")?.toString())
+ projectId.set(modrinthId)
+ versionName.set("${project.version} (Forge)")
+ versionNumber.set("${project.version}-forge")
+ versionType.set("release")
+ uploadFile.set(tasks["remapJar"])
+ gameVersions.set(listOf("1.19.4", "1.19.3"))
+ loaders.set(listOf("fabric", "quilt"))
changelog.set(changelogText)
-
- mainPublication(tasks.remapJar.get())
- secondaryPublication(tasks.remapSourcesJar.get().archiveFile)
-
- val modrinthId: String? by rootProject
- if (modrinthId?.isNotEmpty() == true) {
- modrinth {
- token.set(findProperty("modrinth.token")?.toString() ?: "Modrinth publishing token not found")
- id.set(modrinthId)
- version.set("${project.version}-forge")
- }
- }
-
- val curseforgeId: String? by rootProject
- if (curseforgeId?.isNotEmpty() == true) {
- curseforge {
- token.set(findProperty("curseforge.token")?.toString() ?: "Curseforge publishing token not found")
- id.set(curseforgeId)
- gameVersions.add("Java 17")
- }
- }
+ syncBodyFrom.set(rootProject.file("README.md").readText())
+ }
+}
+rootProject.tasks["releaseMod"].dependsOn(tasks["modrinth"])
+
+val curseforgeId: String by project
+if (hasProperty("curseforge.token") && curseforgeId.isNotEmpty()) {
+ curseforge {
+ apiKey = findProperty("curseforge.token")
+ project(closureOf<me.hypherionmc.cursegradle.CurseProject> {
+ mainArtifact(tasks["remapJar"], closureOf<me.hypherionmc.cursegradle.CurseArtifact> {
+ displayName = "[Forge] ${project.version}"
+ })
+
+ id = curseforgeId
+ releaseType = "release"
+ addGameVersion("1.19.4")
+ addGameVersion("1.19.3")
+ addGameVersion("Fabric")
+ addGameVersion("Java 17")
+
+ changelog = changelogText
+ changelogType = "markdown"
+ })
+
+ options(closureOf<me.hypherionmc.cursegradle.Options> {
+ forgeGradleIntegration = false
+ })
}
}
-rootProject.tasks["releaseMod"].dependsOn(tasks["publishUnified"])
+rootProject.tasks["releaseMod"].dependsOn(tasks["curseforge"])
publishing {
publications {
diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml
index e811335..e7cbd5f 100644
--- a/gradle/libs.versions.toml
+++ b/gradle/libs.versions.toml
@@ -4,7 +4,8 @@ architectury_loom = "1.1.+"
architectury_plugin = "3.4.+"
shadow = "7.1.+"
quilt_quiltflower = "1.8.+"
-unified_publishing = "0.1.+"
+minotaur = "2.7.+"
+cursegradle = "2.+"
github_release = "2.+"
machete = "2.+"
grgit = "5.0.+"
@@ -42,7 +43,8 @@ architectury_loom = { id = "dev.architectury.loom", version.ref = "architectury_
architectury_plugin = { id = "architectury-plugin", version.ref = "architectury_plugin" }
shadow = { id = "com.github.johnrengelman.shadow", version.ref = "shadow" }
-unified_publishing = { id = "me.shedaniel.unified-publishing", version.ref = "unified_publishing" }
+minotaur = { id = "com.modrinth.minotaur", version.ref = "minotaur" }
+cursegradle = { id = "me.hypherionmc.cursegradle", version.ref = "cursegradle" }
github_release = { id = "com.github.breadmoirai.github-release", version.ref = "github_release" }
machete = { id = "io.github.p03w.machete", version.ref = "machete" }
grgit = { id = "org.ajoberstar.grgit", version.ref = "grgit" }