From a6676e0ea9d6fcae16d96faff9bad0415b14c555 Mon Sep 17 00:00:00 2001 From: Lukas Cardot Date: Mon, 6 Nov 2023 17:32:46 +0100 Subject: [PATCH] feat: add configurable property for skipping sonar compilation --- README.md | 1 + src/main/kotlin/com/ekino/oss/plugin/KotlinQualityPlugin.kt | 1 + .../kotlin/com/ekino/oss/plugin/KotlinQualityPluginExtension.kt | 2 ++ 3 files changed, 4 insertions(+) diff --git a/README.md b/README.md index 567492b..a2fe9ba 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,7 @@ The plugin provides some settings : configure { customDetektConfig = "my-detekt.yml" // custom name for your detekt config, detekt-config-custom.yml by default sonarUrl = "https://my-sonar.com" + skipCompile = false } ``` or diff --git a/src/main/kotlin/com/ekino/oss/plugin/KotlinQualityPlugin.kt b/src/main/kotlin/com/ekino/oss/plugin/KotlinQualityPlugin.kt index f6872f9..e00b55f 100644 --- a/src/main/kotlin/com/ekino/oss/plugin/KotlinQualityPlugin.kt +++ b/src/main/kotlin/com/ekino/oss/plugin/KotlinQualityPlugin.kt @@ -55,6 +55,7 @@ class KotlinQualityPlugin : Plugin { property("sonar.sourceEncoding", "UTF-8") property("sonar.host.url", extension.sonarUrl) property("sonar.coverage.jacoco.xmlReportPaths", "${layout.buildDirectory}/reports/jacoco/test/jacocoTestReport.xml") + property("sonar.gradle.skipCompile", extension.skipCompile) } } diff --git a/src/main/kotlin/com/ekino/oss/plugin/KotlinQualityPluginExtension.kt b/src/main/kotlin/com/ekino/oss/plugin/KotlinQualityPluginExtension.kt index 5470da2..38b695b 100644 --- a/src/main/kotlin/com/ekino/oss/plugin/KotlinQualityPluginExtension.kt +++ b/src/main/kotlin/com/ekino/oss/plugin/KotlinQualityPluginExtension.kt @@ -4,4 +4,6 @@ open class KotlinQualityPluginExtension { var customDetektConfig = "detekt-config-custom.yml" var sonarUrl = "https://sonar.ekino.com" + + var skipCompile = true }