Skip to content

Bump Kover version to 0.8.0-Beta #4055

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 24 additions & 20 deletions buildSrc/src/main/kotlin/kover-conventions.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -37,33 +37,37 @@ subprojects {
}
}

extensions.configure<KoverReportExtension>("koverReport") {
defaults {
html {
setReportDir(conventionProject.layout.buildDirectory.dir("kover/${project.name}/html"))
}
extensions.configure<KoverProjectExtension>("kover") {
reports {
total {
html {
htmlDir = conventionProject.layout.buildDirectory.dir("kover/${project.name}/html")
}

verify {
rule {
/*
* 85 is our baseline that we aim to raise to 90+.
* Missing coverage is typically due to bugs in the agent
* (e.g. signatures deprecated with an error are counted),
* sometimes it's various diagnostic `toString` or `catch` for OOMs/VerificationErrors,
* but some places are definitely worth visiting.
*/
minBound(expectedCoverage[projectName] ?: 85) // COVERED_LINES_PERCENTAGE
verify {
rule {
/*
* 85 is our baseline that we aim to raise to 90+.
* Missing coverage is typically due to bugs in the agent
* (e.g. signatures deprecated with an error are counted),
* sometimes it's various diagnostic `toString` or `catch` for OOMs/VerificationErrors,
* but some places are definitely worth visiting.
*/
minBound(expectedCoverage[projectName] ?: 85) // COVERED_LINES_PERCENTAGE
}
}
}
}
}
}

koverReport {
defaults {
verify {
rule {
minBound(85) // COVERED_LINES_PERCENTAGE
kover {
reports {
total {
verify {
rule {
minBound(85) // COVERED_LINES_PERCENTAGE
}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ rxjava3_version=3.0.2
javafx_version=17.0.2
javafx_plugin_version=0.0.8
binary_compatibility_validator_version=0.13.2
kover_version=0.7.4
kover_version=0.8.0-Beta
blockhound_version=1.0.8.RELEASE
jna_version=5.9.0

Expand Down
44 changes: 22 additions & 22 deletions kotlinx-coroutines-core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -272,31 +272,31 @@ val check by tasks.getting {
}

kover {
excludeTests {
// Always disabled, lincheck doesn't really support coverage
tasks("jvmLincheckTest")
}
currentProject {
instrumentation {
// Always disabled, lincheck doesn't really support coverage
disabledForTestTasks.addAll("jvmLincheckTest")

excludeInstrumentation {
// lincheck has NPE error on `ManagedStrategyStateHolder` class
classes("org.jetbrains.kotlinx.lincheck.*")
// lincheck has NPE error on `ManagedStrategyStateHolder` class
excludedClasses.addAll("org.jetbrains.kotlinx.lincheck.*")
}
}
}

koverReport {
filters {
excludes {
classes(
"kotlinx.coroutines.debug.*", // Tested by debug module
"kotlinx.coroutines.channels.ChannelsKt__DeprecatedKt*", // Deprecated
"kotlinx.coroutines.scheduling.LimitingDispatcher", // Deprecated
"kotlinx.coroutines.scheduling.ExperimentalCoroutineDispatcher", // Deprecated
"kotlinx.coroutines.flow.FlowKt__MigrationKt*", // Migrations
"kotlinx.coroutines.flow.LintKt*", // Migrations
"kotlinx.coroutines.internal.WeakMapCtorCache", // Fallback implementation that we never test
"_COROUTINE._CREATION", // For IDE navigation
"_COROUTINE._BOUNDARY", // For IDE navigation
)
reports {
filters {
excludes {
classes(
"kotlinx.coroutines.debug.*", // Tested by debug module
"kotlinx.coroutines.channels.ChannelsKt__DeprecatedKt*", // Deprecated
"kotlinx.coroutines.scheduling.LimitingDispatcher", // Deprecated
"kotlinx.coroutines.scheduling.ExperimentalCoroutineDispatcher", // Deprecated
"kotlinx.coroutines.flow.FlowKt__MigrationKt*", // Migrations
"kotlinx.coroutines.flow.LintKt*", // Migrations
"kotlinx.coroutines.internal.WeakMapCtorCache", // Fallback implementation that we never test
"_COROUTINE._CREATION", // For IDE navigation
"_COROUTINE._BOUNDARY", // For IDE navigation
)
}
}
}
}
Expand Down
12 changes: 7 additions & 5 deletions kotlinx-coroutines-debug/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,13 @@ configurations {
}
}

koverReport {
filters {
excludes {
// Never used, safety mechanism
classes("kotlinx.coroutines.debug.internal.NoOpProbesKt")
kover {
reports {
filters {
excludes {
// Never used, safety mechanism
classes("kotlinx.coroutines.debug.internal.NoOpProbesKt")
}
}
}
}
18 changes: 10 additions & 8 deletions reactive/kotlinx-coroutines-reactive/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,16 @@ externalDocumentationLink(
url = "https://www.reactive-streams.org/reactive-streams-$reactiveStreamsVersion-javadoc/"
)

koverReport {
filters {
excludes {
classes(
"kotlinx.coroutines.reactive.FlowKt", // Deprecated
"kotlinx.coroutines.reactive.FlowKt__MigrationKt", // Deprecated
"kotlinx.coroutines.reactive.ConvertKt" // Deprecated
)
kover {
reports {
filters {
excludes {
classes(
"kotlinx.coroutines.reactive.FlowKt", // Deprecated
"kotlinx.coroutines.reactive.FlowKt__MigrationKt", // Deprecated
"kotlinx.coroutines.reactive.ConvertKt" // Deprecated
)
}
}
}
}
16 changes: 9 additions & 7 deletions reactive/kotlinx-coroutines-reactor/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,15 @@ externalDocumentationLink(
)


koverReport {
filters {
excludes {
classes(
"kotlinx.coroutines.reactor.FlowKt", // Deprecated
"kotlinx.coroutines.reactor.ConvertKt\$asFlux$1" // Deprecated
)
kover {
reports {
filters {
excludes {
classes(
"kotlinx.coroutines.reactor.FlowKt", // Deprecated
"kotlinx.coroutines.reactor.ConvertKt\$asFlux$1" // Deprecated
)
}
}
}
}
2 changes: 0 additions & 2 deletions ui/kotlinx-coroutines-android/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import kotlinx.kover.api.*

configurations {
create("r8")
}
Expand Down