Skip to content

Commit

Permalink
Swap to Darkhax's CurseForgeGradle plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
Ampflower committed Dec 31, 2024
1 parent 89d4dd1 commit 51169a2
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 12 deletions.
24 changes: 15 additions & 9 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ publishing {
}
}


import net.darkhax.curseforgegradle.TaskPublishCurseForge

import java.nio.charset.StandardCharsets

final ref = System.getenv("GITHUB_REF")
Expand All @@ -80,15 +83,18 @@ final type = System.getenv("RELEASE_OVERRIDE") ?:

final minecraftCompatible = libs.versions.minecraft.compatible.get().split(",").toList()

curseforge {
project {
apiKey = System.getenv("CURSEFORGE_TOKEN")
id = curseforgeId
changelog = _changelog
releaseType = type
gameVersionStrings.addAll(minecraftCompatible)
mainArtifact(remapJar)
}
task curseforge(type: TaskPublishCurseForge) {
apiToken = System.getenv("CURSEFORGE_TOKEN")

final def mainFile = upload(curseforgeId, tasks.remapJar)

mainFile.changelog = _changelog
mainFile.changelogType = "markdown"
mainFile.releaseType = type
mainFile.addJavaVersion("Java " + java.targetCompatibility.majorVersion)
mainFile.addGameVersion(*minecraftCompatible)
mainFile.addEnvironment("Server")
mainFile.addModLoader("Fabric", "Quilt")
}

modrinth {
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
org.gradle.jvmargs=-Xmx1G

# Mod Properties
projectVersion=4.3.2
projectVersion=4.3.3-rc.1
maven_group=gay.ampflower.mod

curseforgeId=914551
Expand Down
4 changes: 2 additions & 2 deletions libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ annotations = "24.1.0"
# Plugins
loom = "1.9.+"
minotaur = "2.+"
cursegradle = "1.6.1"
cursegradle = "1.1.26"

[libraries]
# Minecraft
Expand All @@ -31,4 +31,4 @@ mod_runtime = []
[plugins]
loom = { id = "fabric-loom", version.ref = "loom" }
minotaur = { id = "com.modrinth.minotaur", version.ref = "minotaur" }
cursegradle = { id = "io.github.CDAGaming.cursegradle", version.ref = "cursegradle" }
cursegradle = { id = "net.darkhax.curseforgegradle", version.ref = "cursegradle" }

0 comments on commit 51169a2

Please sign in to comment.