diff --git a/build.gradle.kts b/build.gradle.kts index 7100359..0cff5f8 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -53,7 +53,7 @@ qodana { cachePath.set(provider { file(".qodana").canonicalPath }) reportPath.set(provider { file("build/reports/inspections").canonicalPath }) saveReport.set(true) - showReport.set(environment("QODANA_SHOW_REPORT").map { it.toBoolean() } .getOrElse(false)) + showReport.set(environment("QODANA_SHOW_REPORT").map { it.toBoolean() }.getOrElse(false)) } // Configure Gradle Kover Plugin - read more: https://github.com/Kotlin/kotlinx-kover#configuration @@ -72,18 +72,17 @@ tasks { untilBuild.set(properties("pluginUntilBuild")) // Extract the section from README.md and provide for the plugin's manifest - pluginDescription.set(providers.fileContents(layout.buildDirectory.file("README.md")).asText.map { - it.lines().run { - val start = "" - val end = "" - - if (!containsAll(listOf(start, end))) { - throw GradleException("Plugin description section not found in README.md:\n$start ... $end") - } - subList(indexOf(start) + 1, indexOf(end)) - }.joinToString("\n").let { markdownToHTML(it) } + pluginDescription.set(providers.fileContents(layout.projectDirectory.file("README.md")).asText.map { + val start = "" + val end = "" + + with (it.lines()) { + if (!containsAll(listOf(start, end))) { + throw GradleException("Plugin description section not found in README.md:\n$start ... $end") + } + subList(indexOf(start) + 1, indexOf(end)).joinToString("\n").let(::markdownToHTML) } - ) + }) val changelog = project.changelog // local variable for configuration cache compatibility // Get the latest available change notes from the changelog file