configure Sonar only on the root project, aggregate the sonar reports, and always generate Kover XML coverage reports after tests
This commit is contained in:
parent
e45fc71ab9
commit
17ea49aba6
3 changed files with 20 additions and 14 deletions
|
@ -33,21 +33,8 @@ plugins {
|
|||
id("org.jetbrains.kotlinx.kover")
|
||||
}
|
||||
|
||||
sonar {
|
||||
properties {
|
||||
property("sonar.projectName", rootProject.name)
|
||||
property("sonar.projectKey", "ethauvin_${rootProject.name}")
|
||||
property("sonar.organization", "ethauvin-github")
|
||||
property("sonar.host.url", "https://sonarcloud.io")
|
||||
property("sonar.sourceEncoding", "UTF-8")
|
||||
property("sonar.sources", files("src/main/kotlin"))
|
||||
property("sonar.test", files("src/test/kotlin"))
|
||||
property("sonar.coverage.jacoco.xmlReportPaths", "build/reports/kover/report.xml")
|
||||
property("sonar.log.level", "DEBUG")
|
||||
}
|
||||
}
|
||||
|
||||
tasks.withType<SonarTask>().configureEach {
|
||||
dependsOn(tasks.withType<Test>())
|
||||
// workaround for https://github.com/Kotlin/kotlinx-kover/issues/394
|
||||
dependsOn(tasks.matching { it.name == "koverXmlReport" })
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue