Skip to content

Generating merged report for multiproject #773

@fvillalbacar

Description

@fvillalbacar

Hello,

Working in an Android project with several modules I was using koverXmlReport to obtain a XML report. For obtaining a single report of all the modules, the following lines where added into the build.gradle.kts file on the root of the project:

subprojects {
    plugins.withId("org.jetbrains.kotlinx.kover") {
        tasks
            .matching {
                it.name == "koverHtmlReport" ||
                    it.name == "koverXmlReport" ||
                    it.name == "koverVerify"
            }.configureEach {
                enabled = false
            }
    }
}

to avoid the generation of report per project, and also:

kover {
    merge {
        allProjects()
    }
}

to obtain the merged report.

Recently I have added a couple of dimensions, so instead of using the instruction koverXmlReport I am using koverXmlReportDimensionADimensionBDebug in order to get the report and to not compile all the variants (CI needs lots of time).

It seems that for that instruction the setting is ignored and generates a report for each module, and not the merged report. Is there any workaround to obtain a single report using the variant instruction?

Environment:
Android Gradle Plugin: 8.13.0
Gradle Wrapper : 9.1.0
Kover version: 9.3.0

Thanks in advance

Metadata

Metadata

Assignees

Labels

QuestionSupport request issue typeS: in progressStatus: implementing or design in process

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions