Merge pull request #5 from aSemy/fix/sonar_test_coverage
Fix Sonar report
This commit is contained in:
commit
00eef331d8
3 changed files with 20 additions and 14 deletions
|
@ -22,3 +22,20 @@ plugins {
|
|||
|
||||
group = "net.thauvin.erik"
|
||||
version = "1.4.0-SNAPSHOT"
|
||||
|
||||
dependencies {
|
||||
kover(projects.lib)
|
||||
kover(projects.app)
|
||||
}
|
||||
|
||||
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.coverage.jacoco.xmlReportPaths", "build/reports/kover/report.xml")
|
||||
property("sonar.log.level", "DEBUG")
|
||||
}
|
||||
}
|
||||
|
|
|
@ -42,4 +42,6 @@ tasks.withType<Test>().configureEach {
|
|||
exceptionFormat = TestExceptionFormat.FULL
|
||||
events = setOf(TestLogEvent.PASSED, TestLogEvent.SKIPPED, TestLogEvent.FAILED)
|
||||
}
|
||||
|
||||
finalizedBy(tasks.matching { it.name == "koverXmlReport" })
|
||||
}
|
||||
|
|
|
@ -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