Skip to content

Commit a687b21

Browse files
committed
Kover updates
1 parent f7b1ade commit a687b21

File tree

4 files changed

+42
-35
lines changed

4 files changed

+42
-35
lines changed

build.gradle.kts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ plugins {
88
alias(libs.plugins.serialization) apply false
99
alias(libs.plugins.kotlinx.rpc) apply false
1010
alias(libs.plugins.atomicfu) apply false
11-
// alias(libs.plugins.conventions.kover)
1211
alias(libs.plugins.conventions.root)
1312
}
1413

gradle-conventions/src/main/kotlin/conventions-common.gradle.kts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,3 @@ afterEvaluate {
5151
})
5252
}
5353
}
54-
55-
//apply(plugin = "org.jetbrains.kotlinx.kover")
56-
57-
val thisProject = project
58-
59-
//rootProject.configurations.matching { it.name == "kover" }.all {
60-
// rootProject.dependencies.add("kover", thisProject)
61-
//}

gradle-conventions/src/main/kotlin/conventions-kover.gradle.kts

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -7,31 +7,31 @@ import kotlinx.kover.gradle.plugin.dsl.CoverageUnit
77
import kotlinx.kover.gradle.plugin.dsl.GroupingEntityType
88

99
plugins {
10-
// id("org.jetbrains.kotlinx.kover")
10+
id("org.jetbrains.kotlinx.kover")
1111
}
1212

13-
//kover {
14-
// reports {
15-
// total {
16-
// html {
17-
// onCheck.set(false)
18-
// charset.set("UTF-8")
19-
// htmlDir.set(rootDir.resolve("kover"))
20-
// }
21-
//
22-
// verify {
23-
// onCheck.set(false)
24-
//
25-
// rule {
26-
// groupBy.set(GroupingEntityType.APPLICATION)
27-
//
28-
// bound {
29-
// coverageUnits.set(CoverageUnit.LINE)
30-
// aggregationForGroup.set(AggregationType.COVERED_PERCENTAGE)
31-
// minValue.set(70)
32-
// }
33-
// }
34-
// }
35-
// }
36-
// }
37-
//}
13+
kover {
14+
reports {
15+
total {
16+
html {
17+
onCheck.set(false)
18+
charset.set("UTF-8")
19+
htmlDir.set(rootDir.resolve("kover"))
20+
}
21+
22+
verify {
23+
onCheck.set(false)
24+
25+
rule {
26+
groupBy.set(GroupingEntityType.APPLICATION)
27+
28+
bound {
29+
coverageUnits.set(CoverageUnit.LINE)
30+
aggregationForGroup.set(AggregationType.COVERED_PERCENTAGE)
31+
minValue.set(70)
32+
}
33+
}
34+
}
35+
}
36+
}
37+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
/*
2+
* Copyright 2023-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license.
3+
*/
4+
5+
package util
6+
7+
import org.gradle.api.Project
8+
9+
@Suppress("unused")
10+
fun Project.applyKover() {
11+
plugins.apply("org.jetbrains.kotlinx.kover")
12+
13+
rootProject.configurations.matching { it.name == "kover" }.all {
14+
rootProject.dependencies.add("kover", this@applyKover)
15+
}
16+
}

0 commit comments

Comments
 (0)