vanniktech / gradle-android-junit-jacoco-plugin

Gradle plugin that generates JaCoCo reports from an Android Gradle Project
http://vanniktech.com
Apache License 2.0
399 stars 72 forks source link

How to get merged report for multiple module and multiple flavor #145

Closed DavidLiuBlockChainTech closed 5 years ago

DavidLiuBlockChainTech commented 5 years ago

Hi, I am currently using this awesome plugin to generate coverage report.

My project structure looks like this:

app(android): with flavor 'mock' and 'prod'
  -- data (android) with flavor 'mock' and 'prod'
  -- domain (java) 

I have followed the tutorial and my root build.gradle is here:

buildscript {
    dependencies {
        ...
        classpath "com.vanniktech:gradle-android-junit-jacoco-plugin:0.13.0"
    }
}

apply plugin: "com.vanniktech.android.junit.jacoco"

Nothing more for module's build.gradle.

The questions is that how can I generate merged jacoco report which covers all related subprojects with specific flavor?

Like combinedMockDebug report which covers all subProjects and subProjects's unitTest and androidTest.

And one more thing, how can I ignore Kotlin generated class, like get and set in data class

Thanks in advance.

PS: I can't find task mergeJacocoReports and jacocoTestReportMerged I only can find combinedTestReportMockDeubg and jacocoTestReport<Flavor><BuildType>

vanniktech commented 5 years ago

I think the task is broken. #139

Flavor support might not be super supported. I'm not using them and some support was added by external contributors.

vanniktech commented 5 years ago

I'm closing this issue due to inactivity. If you have any further input on the issue, don't hesitate to reopen this issue or post a new one.