Skip to content

Commit 7d5e73f

Browse files
committed
feat: add printModrinthBody task to build.gradle for displaying Modrinth description
1 parent 4d3f1ac commit 7d5e73f

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

build.gradle

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,19 @@ modrinth {
152152
syncBodyFrom = writeModrinthBodyFile(modrinthBody).absolutePath
153153
}
154154

155+
tasks.register('printModrinthBody') {
156+
group = 'help'
157+
description = 'Print the Modrinth description body chosen for this version (fetches GitHub release body or falls back to README.md) and show the file path'
158+
doLast {
159+
def body = fetchReleaseDescription(tag)
160+
def outFile = writeModrinthBodyFile(body)
161+
println "Modrinth description written to: ${outFile.absolutePath}"
162+
println '---- Modrinth description start ----'
163+
println body
164+
println '---- Modrinth description end ----'
165+
}
166+
}
167+
155168
publishing {
156169
publications {
157170
create("maven", MavenPublication) {

0 commit comments

Comments
 (0)