Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate CF publishing to CurseForgeGradle, fixing the upload error #16

Merged
merged 1 commit into from
Mar 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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'
}