mirror of
https://github.com/JetBrains/intellij-platform-plugin-template.git
synced 2024-10-27 20:44:05 +00:00
Improve changes notes and plugin description provider handling
This commit is contained in:
parent
f147d6950f
commit
9dcd4ef23b
@ -72,8 +72,8 @@ tasks {
|
||||
untilBuild.set(properties("pluginUntilBuild"))
|
||||
|
||||
// Extract the <!-- Plugin description --> section from README.md and provide for the plugin's manifest
|
||||
pluginDescription.set(provider {
|
||||
file("README.md").readText().lines().run {
|
||||
pluginDescription.set(providers.fileContents(layout.buildDirectory.file("README.md")).asText.map {
|
||||
it.lines().run {
|
||||
val start = "<!-- Plugin description -->"
|
||||
val end = "<!-- Plugin description end -->"
|
||||
|
||||
@ -86,10 +86,10 @@ tasks {
|
||||
)
|
||||
|
||||
// Get the latest available change notes from the changelog file
|
||||
changeNotes.set(provider {
|
||||
changeNotes.set(properties("pluginVersion").map { pluginVersion ->
|
||||
with(changelog) {
|
||||
renderItem(
|
||||
getOrNull(properties("pluginVersion").get())
|
||||
getOrNull(pluginVersion)
|
||||
?: runCatching { getLatest() }.getOrElse { getUnreleased() },
|
||||
Changelog.OutputType.HTML,
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user