0

I’m using JaCoCo Gradle plugin in my project. Just as an example of the question, most of my code is under package com.me.mysoftware.

I’m using code generator that generate classes under build/generated/java/....../com/me/software/MyGeneratedClass.java

I would like that all of the classes under this generated directory will be excluded from JaCoCo report, but not the entire package (what’s under src/main/...)

How is this possible?

slashms
  • 928
  • 9
  • 26

1 Answers1

0

add excludes = [ com.me.software.MyGeneratedClass ]

see https://docs.gradle.org/current/userguide/jacoco_plugin.html#default_values_of_the_jacoco_task_extension for more help

PrasadU
  • 2,154
  • 1
  • 9
  • 10
  • This is not helpful as I have hundreds of such generated class. This is the reason I'm looking to exclude the entire directory. – slashms Nov 11 '20 at 18:37