Getting No coverage information was found with Kover 0.7.6
jigarpandyadev opened this issue · 10 comments
I am using Kover 0.7.6 for a multi-module android app.
in project's build.gradle, have added plugin
id("org.jetbrains.kotlinx.kover") version "0.7.6" apply false
Also based on an open issue, have added
subprojects {
project.tasks.whenTaskAdded { task ->
if (task.name.toLowerCase().contains("koverhtmlreport")) {
task.doNotTrackState("Don't support state tracking")
}
}
}
in app module's build.gradle,
id("org.jetbrains.kotlinx.kover")
koverReport {
androidReports("debug"){
filters {
excludes {
classes(
"*Fragment",
"*Fragment\$*",
"*Activity",
"*Activity\$*",
"*.databinding.*",
"*.BuildConfig"
)
}
}
}
}
and also added depenedencies of other modules in app module
kover project(":module")
also added kover plugin to other modules. but I keep getting the error like in the attached screenshot. Any help is appreciated.
Hi,
could you please clarify, which task do you use to generate the report?
And is the set of Android build variants the same in all modules?
@shanshin I have only debug and release variants for all modules. I tried with ./gradlew koverHtmlReport and ./gradlew koverHtmlReportDebug commands. I also tried version 0.8.2. Also when I run ./gradlew koverLog command, I get No sources for some of the modules.
Using 0.8.2
, try to call ./gradlew :app:koverHtmlReportDebug
and open the report in the build directory of the app
module (if you specify dependencies { kover(project("...")) }
in app
).
In this case, a reproducer project is needed
Can you check in this demo project, why modules common2 and library2 have No coverage information was found problem
Sketchboard.zip
Hey @shanshin thanks for checking. pls see in the attached screenshot that you shared, it doesn't list packages from common2 and library2 modules. My concern is, I'm unable to generate coverage for all the modules.
thanks for the help @shanshin.