Skip to content

Commit

Permalink
Migrate CF publishing to CurseForgeGradle, fixing the upload error (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
eigenraven authored Mar 11, 2024
1 parent 13212d2 commit 41b77a9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
18 changes: 9 additions & 9 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import com.matthewprenger.cursegradle.CurseExtension
import com.modrinth.minotaur.ModrinthExtension
import java.time.LocalDateTime
import java.time.format.DateTimeFormatter
Expand Down Expand Up @@ -137,13 +136,14 @@ pluginManager.withPlugin("com.modrinth.minotaur") {
modrinth.changelog = project.file("/build/doc/changelog.html").readText(Charsets.UTF_8)
}

pluginManager.withPlugin("com.matthewprenger.cursegradle") {
val curse = project.extensions.getByType<CurseExtension>()
curse.curseProjects.forEach {
it.releaseType = curse_release_type
it.changelogType = "html"
it.addArtifact(fairPlayJar.get().archiveFile)
it.mainArtifact.changelog = project.file("build/doc/changelog.html")
it.additionalArtifacts.forEach { it.changelog = project.file("build/doc/changelog.html") }
tasks.publishCurseforge {
val mainArtifact = this.uploadArtifacts[0]
mainArtifact.releaseType = curse_release_type
mainArtifact.changelogType = "html"
mainArtifact.changelog = project.file("/build/doc/changelog.html")
mainArtifact.withAdditionalFile(fairPlayJar.get().archiveFile.get().asFile)
mainArtifact.additionalArtifacts.forEach { additionalArtifact ->
additionalArtifact.changelogType = mainArtifact.changelogType
additionalArtifact.changelog = mainArtifact.changelog
}
}
2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ pluginManagement {
}

plugins {
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.16'
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.17'
}

0 comments on commit 41b77a9

Please sign in to comment.