JaCoCo gradle plugin exclude

user1226868

I want to exclude some clasess from JaCoCo but the exclude doest seem to work.

For example i want to exclude all Java clasess that end with Dao (for example com.company.EmplyeeDao).

I have tried the following code, but it still shows up when i push this to sonar / use JacocoTestReport.

test {
    jacoco {
        append = true
        destinationFile = file("$buildDir/jacoco/jacocoTest.exec")
        classDumpFile = file("$buildDir/jacoco/classpathdumps")
        excludes = ['*Dao']
}
}

I'm using this in combination with Android. What is going on?

Juan Saravia

Try something like this:

excludes: ['**/Dao*.class']

But as I understand, this will exclude the class from jacoco but the Report that Jacoco creates will show you "0% of coverage": Gradle issue: https://issues.gradle.org/browse/GRADLE-2955

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Gradle Jacoco plugin not generating reports

From Dev

Gradle 1.9 with Jacoco plugin cannot find jacoco agent

From Java

Exclude transitive dependency of Gradle plugin

From Dev

Exclude transitive dependency of Gradle plugin

From Dev

Exclude packages from Jacoco report using Sonarrunner and Gradle

From Dev

Jacoco and Unit Tests Code Coverage with android-gradle-plugin >= 1.1

From Dev

Gradle test fails using the JaCoCo plugin with Java 15?

From Dev

How can I exclude files of the Code Coverage of SonarQube using JaCoCo maven plugin

From Dev

Gradle exclude plugin in main project for specific subproject(s)

From Dev

Exclude tests using J2ObjC Gradle Plugin

From Dev

Exclude folder in jacoco coverage report

From Dev

JaCoCo & Gradle - Filtering Options

From Dev

Jacoco with Android Gradle 1.3.0

From Dev

Applying Jacoco in Gradle Multiproject

From Dev

Spoon and Jacoco with gradle

From Dev

How to report Jacoco Groovy code coverage to Sonar using new Gradle SonarQube plugin?

From Dev

How do I get a jacoco coverage report using Android gradle plugin 0.10.0 or higher?

From Dev

build.gradle with Jacoco plugin doesn't generate coverage report for integration tests

From Dev

How do I get a jacoco coverage report using Android gradle plugin 0.10.0 or higher?

From Dev

Jenkins jacoco plugin empty report

From Java

Filter JaCoCo coverage reports with Gradle

From Dev

Use JaCoCo in Android Project with Gradle

From Dev

How to exclude a class from Jacoco coverage?

From Dev

JaCoCo: exclude generated methods (using it with Lombok)

From Dev

JaCoCo coverage report setups(exclude test classes)

From Dev

How to exclude a line from jacoco code coverage?

From Dev

JaCoCo coverage report setups(exclude test classes)

From Dev

maven exclude plugin in dependency

From Dev

Gradle global exclude

Related Related

  1. 1

    Gradle Jacoco plugin not generating reports

  2. 2

    Gradle 1.9 with Jacoco plugin cannot find jacoco agent

  3. 3

    Exclude transitive dependency of Gradle plugin

  4. 4

    Exclude transitive dependency of Gradle plugin

  5. 5

    Exclude packages from Jacoco report using Sonarrunner and Gradle

  6. 6

    Jacoco and Unit Tests Code Coverage with android-gradle-plugin >= 1.1

  7. 7

    Gradle test fails using the JaCoCo plugin with Java 15?

  8. 8

    How can I exclude files of the Code Coverage of SonarQube using JaCoCo maven plugin

  9. 9

    Gradle exclude plugin in main project for specific subproject(s)

  10. 10

    Exclude tests using J2ObjC Gradle Plugin

  11. 11

    Exclude folder in jacoco coverage report

  12. 12

    JaCoCo & Gradle - Filtering Options

  13. 13

    Jacoco with Android Gradle 1.3.0

  14. 14

    Applying Jacoco in Gradle Multiproject

  15. 15

    Spoon and Jacoco with gradle

  16. 16

    How to report Jacoco Groovy code coverage to Sonar using new Gradle SonarQube plugin?

  17. 17

    How do I get a jacoco coverage report using Android gradle plugin 0.10.0 or higher?

  18. 18

    build.gradle with Jacoco plugin doesn't generate coverage report for integration tests

  19. 19

    How do I get a jacoco coverage report using Android gradle plugin 0.10.0 or higher?

  20. 20

    Jenkins jacoco plugin empty report

  21. 21

    Filter JaCoCo coverage reports with Gradle

  22. 22

    Use JaCoCo in Android Project with Gradle

  23. 23

    How to exclude a class from Jacoco coverage?

  24. 24

    JaCoCo: exclude generated methods (using it with Lombok)

  25. 25

    JaCoCo coverage report setups(exclude test classes)

  26. 26

    How to exclude a line from jacoco code coverage?

  27. 27

    JaCoCo coverage report setups(exclude test classes)

  28. 28

    maven exclude plugin in dependency

  29. 29

    Gradle global exclude

HotTag

Archive