Resolve ktlint reports

This commit is contained in:
Jakub Chrzanowski 2020-08-09 10:42:05 +02:00 committed by Jakub Chrzanowski
parent 741869f9cc
commit 86bde4433d
2 changed files with 20 additions and 13 deletions

View File

@ -11,6 +11,9 @@
- Dependencies - bump ktlint to 9.3.0 - Dependencies - bump ktlint to 9.3.0
- GitHub Actions - make *Update Changelog* job dependent on the *Publish Plugin* - GitHub Actions - make *Update Changelog* job dependent on the *Publish Plugin*
### Fixed
- Resolve ktlint reports
## [0.3.1] ## [0.3.1]
### Changed ### Changed
- GitHub Actions - run plugin verifier against 2019.3 2020.1 2020.2 - GitHub Actions - run plugin verifier against 2019.3 2020.1 2020.2

View File

@ -91,22 +91,26 @@ tasks {
untilBuild(pluginUntilBuild) untilBuild(pluginUntilBuild)
// Extract the <!-- Plugin description --> section from README.md and provide for the plugin's manifest // Extract the <!-- Plugin description --> section from README.md and provide for the plugin's manifest
pluginDescription(closure { pluginDescription(
File("./README.md").readText().lines().run { closure {
val start = "<!-- Plugin description -->" File("./README.md").readText().lines().run {
val end = "<!-- Plugin description end -->" val start = "<!-- Plugin description -->"
val end = "<!-- Plugin description end -->"
if (!containsAll(listOf(start, end))) { if (!containsAll(listOf(start, end))) {
throw GradleException("Plugin description section not found in README.md file:\n$start ... $end") throw GradleException("Plugin description section not found in README.md file:\n$start ... $end")
} }
subList(indexOf(start) + 1, indexOf(end)) subList(indexOf(start) + 1, indexOf(end))
}.joinToString("\n").run { markdownToHTML(this) } }.joinToString("\n").run { markdownToHTML(this) }
}) }
)
// Get the latest available change notes from the changelog file // Get the latest available change notes from the changelog file
changeNotes(closure { changeNotes(
changelog.getLatest().toHTML() closure {
}) changelog.getLatest().toHTML()
}
)
} }
publishPlugin { publishPlugin {