Skip to content

Commit

Permalink
fix(tests): #108 exclude nonstandard sourceSets from test coverage
Browse files Browse the repository at this point in the history
Fixes #108
  • Loading branch information
SIMULATAN committed Dec 15, 2024
1 parent ea55758 commit 14b790c
Showing 1 changed file with 11 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,17 @@ kover {
allProjects()
}
currentProject {
sources {
// per default, kover only excludes `test`
// since we also have `testIntegration`, we have to exclude it
testing.suites
.filterIsInstance<JvmTestSuite>()
.forEach {
excludedSourceSets.add(it.sources.name)
}
// awaiting implementation of https://github.com/Kotlin/kotlinx-kover/issues/714
afterEvaluate {
sources {
// per default, kover only excludes `test`
// since we also have `testIntegration` and `dev`, we have to exclude them
sourceSets
.filter { it.name != sourceSets.main.name }
.forEach {
excludedSourceSets.add(it.name)
}
}
}
}
}

0 comments on commit 14b790c

Please sign in to comment.