Better handling of the Gradle plugin description extraction from the README file

pull/23/head
Jakub Chrzanowski 4 years ago
parent 79f2db0e2b
commit df44c045e3

@ -3,6 +3,9 @@
# IntelliJ Platform Plugin Template Changelog
## [Unreleased]
### Added
- Better handling of the Gradle plugin description extraction from the README file
### Changed
- Gradle - remove kotlin("stdlib-jdk8") dependency to decrease the plugin artifact size

@ -93,7 +93,13 @@ tasks {
// Extract the <!-- Plugin description --> section from README.md and provide for the plugin's manifest
pluginDescription(closure {
File("./README.md").readText().lines().run {
subList(indexOf("<!-- Plugin description -->") + 1, indexOf("<!-- Plugin description end -->"))
val start = "<!-- Plugin description -->"
val end = "<!-- Plugin description end -->"
if (!containsAll(listOf(start, end))) {
throw GradleException("Plugin description section not found in README.md file:\n$start ... $end")
}
subList(indexOf(start) + 1, indexOf(end))
}.joinToString("\n").run { markdownToHTML(this) }
})

Loading…
Cancel
Save