aboutsummaryrefslogtreecommitdiff
path: root/forge
diff options
context:
space:
mode:
authorisXander <xandersmith2008@gmail.com>2023-04-25 16:47:07 +0100
committerisXander <xandersmith2008@gmail.com>2023-04-25 16:47:07 +0100
commitfc6d98ae9728a38514b22ced5128c5a567ae864c (patch)
treec9927fa49167fdd35bc463ee8d4e4e70f04211fc /forge
parent8e4983eef1bc37dfaaf72b1576366dd03ec9a994 (diff)
downloadYetAnotherConfigLib-fc6d98ae9728a38514b22ced5128c5a567ae864c.tar.gz
YetAnotherConfigLib-fc6d98ae9728a38514b22ced5128c5a567ae864c.tar.bz2
YetAnotherConfigLib-fc6d98ae9728a38514b22ced5128c5a567ae864c.zip
use minotaur + cursegradle
Diffstat (limited to 'forge')
-rw-r--r--forge/build.gradle.kts71
1 files changed, 42 insertions, 29 deletions
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 {