From 43f317cb7cb44005c476f48b175c6960a8ce01b2 Mon Sep 17 00:00:00 2001 From: Alexander Schwartz Date: Sat, 22 Apr 2023 18:31:34 +0200 Subject: [PATCH] fixing empty changelog in built plugin --- CHANGELOG.md | 6 +++--- build.gradle.kts | 10 +++++++++- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5e8740a..6b80218 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,10 +5,10 @@ ### Fixed - off-screen rendering now always disabled for old Linux/macOS versions and not configurable (#212) - -### Security -## [0.2.2] - 2023-03-29 +### Security + +## 0.2.2 - 2023-03-29 ### Fixed - undo off-screen rendering as it interferes with keyboard access on Linux/macOS (#212) diff --git a/build.gradle.kts b/build.gradle.kts index d35cc03..5c28f7d 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,4 +1,5 @@ import io.gitlab.arturbosch.detekt.Detekt +import org.jetbrains.changelog.Changelog import org.jetbrains.changelog.date import org.jetbrains.changelog.markdownToHTML import org.jetbrains.kotlin.gradle.tasks.KotlinCompile @@ -121,7 +122,14 @@ tasks { // Get the latest available change notes from the changelog file changeNotes.set( provider { - changelog.getLatest().toHTML() + with(changelog) { + renderItem( + (getOrNull(properties("pluginVersion")) ?: getUnreleased()) + .withHeader(false) + .withEmptySections(false), + Changelog.OutputType.HTML, + ) + } } ) }