From 2b60e78ef94792074ca1aa262c8529a4119e9737 Mon Sep 17 00:00:00 2001 From: Joel Mai <38419872+Inf166@users.noreply.github.com> Date: Tue, 4 Jun 2024 19:39:45 +0200 Subject: [PATCH] [BUGFIX] Fix gradle build script --- build.gradle.kts | 32 +++++++++++--------------------- 1 file changed, 11 insertions(+), 21 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index bf0c939..962daa4 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -23,16 +23,12 @@ repositories { // Dependencies are managed with Gradle version catalog - read more: https://docs.gradle.org/current/userguide/platforms.html#sub:version-catalog dependencies { -// implementation(libs.annotations) +// implementation(libs.exampleLibrary) } -// Set the JVM language level used to build the project. Use Java 11 for 2020.3+, and Java 17 for 2022.2+. +// Set the JVM language level used to build the project. kotlin { - @Suppress("UnstableApiUsage") - jvmToolchain { - languageVersion = JavaLanguageVersion.of(17) - vendor = JvmVendorSpec.JETBRAINS - } + jvmToolchain(17) } // Configure Gradle IntelliJ Plugin - read more: https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html @@ -51,19 +47,13 @@ changelog { repositoryUrl = properties("pluginRepositoryUrl") } -// Configure Gradle Qodana Plugin - read more: https://github.com/JetBrains/gradle-qodana-plugin -qodana { - cachePath = provider { file(".qodana").canonicalPath } - reportPath = provider { file("build/reports/inspections").canonicalPath } - saveReport = true - showReport = environment("QODANA_SHOW_REPORT").map { it.toBoolean() }.getOrElse(false) -} - // Configure Gradle Kover Plugin - read more: https://github.com/Kotlin/kotlinx-kover#configuration -koverReport { - defaults { - xml { - onCheck = true +kover { + reports { + total { + xml { + onCheck = true + } } } } @@ -83,7 +73,7 @@ tasks { val start = "" val end = "" - with (it.lines()) { + with(it.lines()) { if (!containsAll(listOf(start, end))) { throw GradleException("Plugin description section not found in README.md:\n$start ... $end") } @@ -126,6 +116,6 @@ tasks { // The pluginVersion is based on the SemVer (https://semver.org) and supports pre-release labels, like 2.1.7-alpha.3 // Specify pre-release label to publish the plugin in a custom Release Channel automatically. Read more: // https://plugins.jetbrains.com/docs/intellij/deployment.html#specifying-a-release-channel - channels = properties("pluginVersion").map { listOf(it.split('-').getOrElse(1) { "default" }.split('.').first()) } + channels = properties("pluginVersion").map { listOf(it.substringAfter('-', "").substringBefore('.').ifEmpty { "default" }) } } }