Switch to kover for code coverage
Some checks failed
SonarQube Scan / SonarQube Trigger (push) Failing after 4m16s
Some checks failed
SonarQube Scan / SonarQube Trigger (push) Failing after 4m16s
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import com.android.build.gradle.internal.coverage.JacocoReportTask
|
||||
import com.android.build.gradle.internal.lint.AndroidLintTask
|
||||
import com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask
|
||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||
@@ -8,13 +7,14 @@ import org.sonarqube.gradle.SonarTask
|
||||
plugins {
|
||||
alias(libs.plugins.versions)
|
||||
alias(libs.plugins.sonarqube)
|
||||
alias(libs.plugins.kotlin.kover)
|
||||
alias(libs.plugins.android.application) apply false
|
||||
alias(libs.plugins.android.library) apply false
|
||||
alias(libs.plugins.compose) apply false
|
||||
alias(libs.plugins.compose.compiler) apply false
|
||||
alias(libs.plugins.kotlin.multiplatform) apply false
|
||||
alias(libs.plugins.kotlin.jvm) apply false
|
||||
alias(libs.plugins.jetbrains.kotlin.android) apply false
|
||||
alias(libs.plugins.kotlin.android) apply false
|
||||
}
|
||||
|
||||
sonar {
|
||||
@@ -22,17 +22,9 @@ sonar {
|
||||
property("sonar.projectKey", "YAEP")
|
||||
property("sonar.projectName", "YAEP")
|
||||
|
||||
val reports = subprojects
|
||||
.flatMap { p ->
|
||||
p.tasks.withType<JacocoReportTask>()
|
||||
}
|
||||
.map { t ->
|
||||
"${t.outputReportDir.asFile.get()}/report.xml"
|
||||
}
|
||||
|
||||
property(
|
||||
"sonar.coverage.jacoco.xmlReportPaths",
|
||||
reports
|
||||
"${layout.buildDirectory.asFile.get()}/reports/kover/report.xml"
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -43,11 +35,7 @@ tasks.withType<SonarTask>().configureEach {
|
||||
.flatMap { it.tasks.withType<AndroidLintTask>() }
|
||||
.filter { it.variantName != "release" }
|
||||
)
|
||||
dependsOn(
|
||||
subprojects
|
||||
.flatMap { it.tasks.withType<JacocoReportTask>() }
|
||||
.filter { it.variantName != "release" }
|
||||
)
|
||||
dependsOn("koverXmlReport")
|
||||
}
|
||||
|
||||
tasks.withType<KotlinJvmCompile>().configureEach {
|
||||
@@ -76,3 +64,10 @@ subprojects {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
kover(projects.domain)
|
||||
kover(projects.commonUI)
|
||||
kover(projects.desktop)
|
||||
kover(projects.android)
|
||||
}
|
||||
Reference in New Issue
Block a user