Closed JWvanV closed 11 months ago
Hi,
If your Gradle build uses mixed K/JVM and Android plugins in different projects and you want to generate a report using the koverHtmlReport
command, then it is necessary in the project in which the report will be generated to specify the coverage of which build variants should be added to the merged report. See docs and examples like this
koverReport {
defaults {
// adds the coverage of `release` build variant to default reports
mergeWith("release")
}
}
Also, koverReport
block must be specified in one project in which the merged report will be generated.
Sorry for the late response, (but still thanks for your quick initial response :D):
koverReport
config in the app:build.gradle.kts
file and run it through ./gradlew app:koverXmlReport app:koverHtmlReport
. (Instead of the global config a running that we did on version 0.6)mergeWith("tstRelease")
in the defaults here. (It wasn't clear to me that the 'release
' build type was used as default for the koverReport.We now do have an issue in our pipeline though. Version 0.7 (or our configuration of it) seems to require way more memory than we needed on 0.6, generating java heap exceptions before the final html report is generated. (it's quite a big project).
Do you have any advice on reducing memory use in the new 0.7 version?
We now do have an issue in our pipeline though. Version 0.7 (or our configuration of it) seems to require way more memory than we needed on 0.6, generating java heap exceptions before the final html report is generated. (it's quite a big project).
Could you clarify what is the approximate increase in memory consumption and on which Gradle task exactly is happening?
If it is not possible to increase the java heap size, you may try using the build cache to perform tests in stages (Gradle build for several subprojects), and generate a Kover report with a separate command.
Again, sorry for the late response. I also had to refactor our unit test suite so be more stable. After doing that first, and then applying the previously mentioned migration, Kover 0.7.3 runs great in our pipeline now :D The memory issue was probably because of the unstable test suite.
Great, thanks!)
Hi,
I'm having difficulty generating a single coverage report for the entire project. We had this working fine for Kover 0.6.x, but we can not seem to get it to work with the current documentation for Kover 0.7.x.
I have a project setup with the following modules and build variants:
Note here that
All gradle build files are in build.gradle.kts Kotlin Scripts.
For consistency, we define kover in once in the root build.gradle.kts file:
We tried running all the generated koverHtmlReport, koverHtmlReportRelease and koverHtmlReportTstRelease tasks, but they do not seem to give the wanted result.
Are we going about this the wrong way? If there are any pointers to get this to work it would be greatly appreciated :D