Skip to content

Commit

Permalink
feat: add changelog helpers
Browse files Browse the repository at this point in the history
  • Loading branch information
Prototik committed Jan 10, 2024
1 parent e3e4ee9 commit 444b50f
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ cursedPublish {
displayName("MyCoolMod (Fabric)")

// Changelog
changelog(CursedChangelogType.Text, "Some changelog")
changelogMarkdown("# Some changelog for my CoolMod")

// Minecraft version
minecraft("1.20.4")
Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ signing {

tasks {
publishPlugins {
onlyIf { nyxState.coreVersion }
onlyIf { nyxState.coreVersion && nyxState.newRelease }
}
nyxPublish {
dependsOn(publishPlugins)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ object KotlinGradleBuildScriptSpec : GradleBuildScriptSpec({ projectDir, apiBase

file(tasks.jar) {
displayName("MyCoolMod (Fabric)")
changelog(CursedChangelogType.Text, "Some changelog")
changelogText("Some changelog")

minecraft("1.20.4")
fabric()
Expand Down Expand Up @@ -173,7 +173,7 @@ object GroovyGradleBuildScriptSpec : GradleBuildScriptSpec({ projectDir, apiBase

file(tasks.jar) {
displayName 'MyCoolMod (Fabric)'
changelog CursedChangelogType.Text, 'Some changelog'
changelogText 'Some changelog'

minecraft '1.20.4'
fabric()
Expand Down
5 changes: 5 additions & 0 deletions src/main/kotlin/rocks/aur/cursedpublish/CursedFile.kt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import org.gradle.internal.*
import org.jetbrains.annotations.*
import java.io.*

@Suppress("unused")
@ApiStatus.NonExtendable
@CursedDsl
@SubclassOptInRequired(markerClass = CursedInternalApi::class)
Expand All @@ -35,6 +36,10 @@ interface CursedFile : Named, Buildable {
changelog(changelog)
}

fun changelogText(changelog: String) = changelog(CursedChangelogType.Text, changelog)
fun changelogHtml(changelog: String) = changelog(CursedChangelogType.Html, changelog)
fun changelogMarkdown(changelog: String) = changelog(CursedChangelogType.Markdown, changelog)

@get:Input
@get:Optional
val displayName: Property<String>
Expand Down

0 comments on commit 444b50f

Please sign in to comment.