try fixing Sonar + KMP...
This commit is contained in:
parent
dce203845e
commit
a493d4e00b
2 changed files with 17 additions and 0 deletions
|
@ -2,6 +2,7 @@ package buildsrc.conventions.lang
|
|||
|
||||
plugins {
|
||||
id("buildsrc.conventions.lang.kotlin-multiplatform-base")
|
||||
id("buildsrc.conventions.sonarqube")
|
||||
}
|
||||
|
||||
kotlin {
|
||||
|
@ -9,3 +10,13 @@ kotlin {
|
|||
withJava()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
sonar {
|
||||
properties {
|
||||
property("sonar.sources", "src/jvmMain/kotlin")
|
||||
property("sonar.test", "src/jvmTest/kotlin")
|
||||
property("sonar.junit.reportPaths", "build/test-results/jvmTest")
|
||||
property("sonar.surefire.reportsPath", "build/test-results/jvmTest")
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
|
||||
package buildsrc.conventions
|
||||
|
||||
import org.sonarqube.gradle.SonarExtension.SONAR_DEPRECATED_TASK_NAME
|
||||
import org.sonarqube.gradle.SonarTask
|
||||
|
||||
/**
|
||||
|
@ -38,3 +39,8 @@ tasks.withType<SonarTask>().configureEach {
|
|||
// workaround for https://github.com/Kotlin/kotlinx-kover/issues/394
|
||||
dependsOn(tasks.matching { it.name == "koverXmlReport" })
|
||||
}
|
||||
|
||||
tasks.matching { it.name == SONAR_DEPRECATED_TASK_NAME }.configureEach {
|
||||
// this task is deprecated, use 'sonar' instead
|
||||
group = "other"
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue