Skip to content

Commit 48178b3

Browse files
authored
Bump Kover version to 0.8.0-Beta (#4055)
1 parent 7bed717 commit 48178b3

File tree

7 files changed

+73
-65
lines changed

7 files changed

+73
-65
lines changed

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

+24-20
Original file line numberDiff line numberDiff line change
@@ -37,33 +37,37 @@ subprojects {
3737
}
3838
}
3939

40-
extensions.configure<KoverReportExtension>("koverReport") {
41-
defaults {
42-
html {
43-
setReportDir(conventionProject.layout.buildDirectory.dir("kover/${project.name}/html"))
44-
}
40+
extensions.configure<KoverProjectExtension>("kover") {
41+
reports {
42+
total {
43+
html {
44+
htmlDir = conventionProject.layout.buildDirectory.dir("kover/${project.name}/html")
45+
}
4546

46-
verify {
47-
rule {
48-
/*
49-
* 85 is our baseline that we aim to raise to 90+.
50-
* Missing coverage is typically due to bugs in the agent
51-
* (e.g. signatures deprecated with an error are counted),
52-
* sometimes it's various diagnostic `toString` or `catch` for OOMs/VerificationErrors,
53-
* but some places are definitely worth visiting.
54-
*/
55-
minBound(expectedCoverage[projectName] ?: 85) // COVERED_LINES_PERCENTAGE
47+
verify {
48+
rule {
49+
/*
50+
* 85 is our baseline that we aim to raise to 90+.
51+
* Missing coverage is typically due to bugs in the agent
52+
* (e.g. signatures deprecated with an error are counted),
53+
* sometimes it's various diagnostic `toString` or `catch` for OOMs/VerificationErrors,
54+
* but some places are definitely worth visiting.
55+
*/
56+
minBound(expectedCoverage[projectName] ?: 85) // COVERED_LINES_PERCENTAGE
57+
}
5658
}
5759
}
5860
}
5961
}
6062
}
6163

62-
koverReport {
63-
defaults {
64-
verify {
65-
rule {
66-
minBound(85) // COVERED_LINES_PERCENTAGE
64+
kover {
65+
reports {
66+
total {
67+
verify {
68+
rule {
69+
minBound(85) // COVERED_LINES_PERCENTAGE
70+
}
6771
}
6872
}
6973
}

gradle.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ rxjava3_version=3.0.2
2020
javafx_version=17.0.2
2121
javafx_plugin_version=0.0.8
2222
binary_compatibility_validator_version=0.13.2
23-
kover_version=0.7.4
23+
kover_version=0.8.0-Beta
2424
blockhound_version=1.0.8.RELEASE
2525
jna_version=5.9.0
2626

kotlinx-coroutines-core/build.gradle.kts

+22-22
Original file line numberDiff line numberDiff line change
@@ -272,31 +272,31 @@ val check by tasks.getting {
272272
}
273273

274274
kover {
275-
excludeTests {
276-
// Always disabled, lincheck doesn't really support coverage
277-
tasks("jvmLincheckTest")
278-
}
275+
currentProject {
276+
instrumentation {
277+
// Always disabled, lincheck doesn't really support coverage
278+
disabledForTestTasks.addAll("jvmLincheckTest")
279279

280-
excludeInstrumentation {
281-
// lincheck has NPE error on `ManagedStrategyStateHolder` class
282-
classes("org.jetbrains.kotlinx.lincheck.*")
280+
// lincheck has NPE error on `ManagedStrategyStateHolder` class
281+
excludedClasses.addAll("org.jetbrains.kotlinx.lincheck.*")
282+
}
283283
}
284-
}
285284

286-
koverReport {
287-
filters {
288-
excludes {
289-
classes(
290-
"kotlinx.coroutines.debug.*", // Tested by debug module
291-
"kotlinx.coroutines.channels.ChannelsKt__DeprecatedKt*", // Deprecated
292-
"kotlinx.coroutines.scheduling.LimitingDispatcher", // Deprecated
293-
"kotlinx.coroutines.scheduling.ExperimentalCoroutineDispatcher", // Deprecated
294-
"kotlinx.coroutines.flow.FlowKt__MigrationKt*", // Migrations
295-
"kotlinx.coroutines.flow.LintKt*", // Migrations
296-
"kotlinx.coroutines.internal.WeakMapCtorCache", // Fallback implementation that we never test
297-
"_COROUTINE._CREATION", // For IDE navigation
298-
"_COROUTINE._BOUNDARY", // For IDE navigation
299-
)
285+
reports {
286+
filters {
287+
excludes {
288+
classes(
289+
"kotlinx.coroutines.debug.*", // Tested by debug module
290+
"kotlinx.coroutines.channels.ChannelsKt__DeprecatedKt*", // Deprecated
291+
"kotlinx.coroutines.scheduling.LimitingDispatcher", // Deprecated
292+
"kotlinx.coroutines.scheduling.ExperimentalCoroutineDispatcher", // Deprecated
293+
"kotlinx.coroutines.flow.FlowKt__MigrationKt*", // Migrations
294+
"kotlinx.coroutines.flow.LintKt*", // Migrations
295+
"kotlinx.coroutines.internal.WeakMapCtorCache", // Fallback implementation that we never test
296+
"_COROUTINE._CREATION", // For IDE navigation
297+
"_COROUTINE._BOUNDARY", // For IDE navigation
298+
)
299+
}
300300
}
301301
}
302302
}

kotlinx-coroutines-debug/build.gradle.kts

+7-5
Original file line numberDiff line numberDiff line change
@@ -99,11 +99,13 @@ configurations {
9999
}
100100
}
101101

102-
koverReport {
103-
filters {
104-
excludes {
105-
// Never used, safety mechanism
106-
classes("kotlinx.coroutines.debug.internal.NoOpProbesKt")
102+
kover {
103+
reports {
104+
filters {
105+
excludes {
106+
// Never used, safety mechanism
107+
classes("kotlinx.coroutines.debug.internal.NoOpProbesKt")
108+
}
107109
}
108110
}
109111
}

reactive/kotlinx-coroutines-reactive/build.gradle.kts

+10-8
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,16 @@ externalDocumentationLink(
3636
url = "https://www.reactive-streams.org/reactive-streams-$reactiveStreamsVersion-javadoc/"
3737
)
3838

39-
koverReport {
40-
filters {
41-
excludes {
42-
classes(
43-
"kotlinx.coroutines.reactive.FlowKt", // Deprecated
44-
"kotlinx.coroutines.reactive.FlowKt__MigrationKt", // Deprecated
45-
"kotlinx.coroutines.reactive.ConvertKt" // Deprecated
46-
)
39+
kover {
40+
reports {
41+
filters {
42+
excludes {
43+
classes(
44+
"kotlinx.coroutines.reactive.FlowKt", // Deprecated
45+
"kotlinx.coroutines.reactive.FlowKt__MigrationKt", // Deprecated
46+
"kotlinx.coroutines.reactive.ConvertKt" // Deprecated
47+
)
48+
}
4749
}
4850
}
4951
}

reactive/kotlinx-coroutines-reactor/build.gradle.kts

+9-7
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,15 @@ externalDocumentationLink(
3232
)
3333

3434

35-
koverReport {
36-
filters {
37-
excludes {
38-
classes(
39-
"kotlinx.coroutines.reactor.FlowKt", // Deprecated
40-
"kotlinx.coroutines.reactor.ConvertKt\$asFlux$1" // Deprecated
41-
)
35+
kover {
36+
reports {
37+
filters {
38+
excludes {
39+
classes(
40+
"kotlinx.coroutines.reactor.FlowKt", // Deprecated
41+
"kotlinx.coroutines.reactor.ConvertKt\$asFlux$1" // Deprecated
42+
)
43+
}
4244
}
4345
}
4446
}

ui/kotlinx-coroutines-android/build.gradle.kts

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import kotlinx.kover.api.*
2-
31
configurations {
42
create("r8")
53
}

0 commit comments

Comments
 (0)