# Class JacocoReportBase

java.lang.Object
org.gradle.api.internal.AbstractTask
org.gradle.api.DefaultTask
org.gradle.testing.jacoco.tasks.JacocoBase
org.gradle.testing.jacoco.tasks.JacocoReportBase

All Implemented Interfaces:
  `Comparable<Task>, org.gradle.api.internal.DynamicObjectAware, org.gradle.api.internal.TaskInternal, Named, ExtensionAware, Task, Configurable<Task>`

Direct Known Subclasses:
  `JacocoCoverageVerification, JacocoReport`

@DisableCachingByDefault(because="Abstract super-class, not to be instantiated directly") public abstract class JacocoReportBase extends JacocoBase
Base class for Jacoco report tasks.

Since:
  3.4

- ## Nested Class Summary

  ### Nested classes/interfaces inherited from interface Named

  `Named.Namer`

- ## Field Summary

  ### Fields inherited from interface Task

  `TASK_ACTION, TASK_CONSTRUCTOR_ARGS, TASK_DEPENDS_ON, TASK_DESCRIPTION, TASK_GROUP, TASK_NAME, TASK_OVERWRITE, TASK_TYPE`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `JacocoReportBase()`
  Creates a new `JacocoReportBase`.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `additionalClassDirs(File... dirs)`
  Adds additional class directories to those that will be included in the report.
  `void`
  `additionalClassDirs(FileCollection dirs)`
  Adds additional class directories to those that will be included in the report.
  `void`
  `additionalSourceDirs(File... dirs)`
  Adds additional source directories to be used for any classes included in the report.
  `void`
  `additionalSourceDirs(FileCollection dirs)`
  Adds additional source directories to be used for any classes included in the report.
  `void`
  `executionData(Object... files)`
  Adds execution data files to be used during coverage analysis.
  `void`
  `executionData(Task... tasks)`
  Adds execution data generated by a task to the list of those used during coverage analysis.
  `void`
  `executionData(TaskCollection tasks)`
  Adds execution data generated by the given tasks to the list of those used during coverage analysis.
  `abstract ConfigurableFileCollection`
  `getAdditionalClassDirs()`
  Additional class dirs that coverage data should be reported for.
  `abstract ConfigurableFileCollection`
  `getAdditionalSourceDirs()`
  Additional source dirs for the classes coverage data is being reported for.
  `FileCollection`
  `getAllClassDirs()`
  Gets the class directories that coverage will be reported for.
  `FileCollection`
  `getAllSourceDirs()`
  Gets the source directories for the classes that will be reported on.
  `abstract ConfigurableFileCollection`
  `getClassDirectories()`
  Source sets that coverage should be reported for.
  `abstract ConfigurableFileCollection`
  `getExecutionData()`
  Collection of execution data files to analyze.
  `protected abstract org.gradle.internal.reflect.Instantiator`
  `getInstantiator()`
  `protected abstract ObjectFactory`
  `getObjectFactory()`
  `abstract ConfigurableFileCollection`
  `getSourceDirectories()`
  Source sets that coverage should be reported for.
  `abstract Property<String>`
  `getSourceEncoding()`
  The character encoding of the source files.
  `void`
  `sourceSets(SourceSet... sourceSets)`
  Adds a source set to the list to be reported on.

  ### Methods inherited from class JacocoBase

  `getJacocoClasspath, setJacocoClasspath`

  ### Methods inherited from class DefaultTask

  `compareTo, configure, dependsOn, doFirst, doFirst, doFirst, doLast, doLast, doLast, finalizedBy, getActions, getAnt, getDependsOn, getDescription, getDestroyables, getDidWork, getEnabled, getExtensions, getFinalizedBy, getGroup, getInputs, getLocalState, getLogger, getLogging, getMustRunAfter, getName, getOutputs, getPath, getProject, getShouldRunAfter, getState, getTaskDependencies, getTemporaryDir, getTimeout, hasProperty, mustRunAfter, onlyIf, onlyIf, onlyIf, property, setActions, setDependsOn, setDescription, setDidWork, setEnabled, setFinalizedBy, setGroup, setMustRunAfter, setOnlyIf, setOnlyIf, setOnlyIf, setProperty, setShouldRunAfter, shouldRunAfter, usesService`

  ### Methods inherited from class org.gradle.api.internal.AbstractTask

  `acceptServiceReferences, appendParallelSafeAction, doNotTrackState, doNotTrackStateIf, getAsDynamicObject, getIdentityPath, getImpliesSubProjects, getLifecycleDependencies, getLoggingManager, getOnlyIf, getReasonNotToTrackState, getReasonsNotToTrackState, getReasonTaskIsIncompatibleWithConfigurationCache, getRequiredServices, getServices, getSharedResources, getStandardOutputCapture, getTaskActions, getTaskIdentity, getTemporaryDirFactory, hasTaskActions, injectIntoNewInstance, isCompatibleWithConfigurationCache, isEnabled, isHasCustomActions, notCompatibleWithConfigurationCache, prependParallelSafeAction, restoreOnlyIf, restoreTaskActions, service, setImpliesSubProjects`

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

  ### Methods inherited from interface Task

  `doNotTrackState, notCompatibleWithConfigurationCache, service`

- ## Constructor Details

  - ### JacocoReportBase

    public JacocoReportBase()
    Creates a new `JacocoReportBase`.
    Since:
      3.4

- ## Method Details

  - ### getInstantiator

    @Inject protected abstract org.gradle.internal.reflect.Instantiator getInstantiator()

  - ### getObjectFactory

    @Inject protected abstract ObjectFactory getObjectFactory()

  - ### getExecutionData

    @PathSensitive(NONE) @InputFiles public abstract ConfigurableFileCollection getExecutionData()
    Collection of execution data files to analyze.
    Since:
      3.4

  - ### getSourceDirectories

    @IgnoreEmptyDirectories @PathSensitive(RELATIVE) @InputFiles public abstract ConfigurableFileCollection getSourceDirectories()
    Source sets that coverage should be reported for.
    Since:
      3.4

  - ### getClassDirectories

    @Classpath public abstract ConfigurableFileCollection getClassDirectories()
    Source sets that coverage should be reported for.
    Since:
      3.4

  - ### getAdditionalClassDirs

    @Optional @IgnoreEmptyDirectories @PathSensitive(RELATIVE) @InputFiles public abstract ConfigurableFileCollection getAdditionalClassDirs()
    Additional class dirs that coverage data should be reported for.
    Since:
      3.4

  - ### getAdditionalSourceDirs

    @Optional @IgnoreEmptyDirectories @PathSensitive(RELATIVE) @InputFiles public abstract ConfigurableFileCollection getAdditionalSourceDirs()
    Additional source dirs for the classes coverage data is being reported for.
    Since:
      3.4

  - ### getSourceEncoding

    @Incubating @Optional @Input public abstract Property<String> getSourceEncoding()
    The character encoding of the source files.
    Since:
      8.8

  - ### executionData

    public void executionData(Object... files)
    Adds execution data files to be used during coverage analysis.
    Parameters:
      `files` - one or more files to add
    Since:
      3.4

  - ### executionData

    public void executionData(Task... tasks)
    Adds execution data generated by a task to the list of those used during coverage analysis. Only tasks with a `JacocoTaskExtension` will be included; all others will be ignored.
    Parameters:
      `tasks` - one or more tasks to add
    Since:
      3.4

  - ### executionData

    public void executionData(TaskCollection tasks)
    Adds execution data generated by the given tasks to the list of those used during coverage analysis. Only tasks with a `JacocoTaskExtension` will be included; all others will be ignored.
    Parameters:
      `tasks` - one or more tasks to add
    Since:
      3.4

  - ### getAllClassDirs

    @Internal public FileCollection getAllClassDirs()
    Gets the class directories that coverage will be reported for. All classes in these directories will be included in the report.
    Returns:
      class dirs to report coverage of
    Since:
      3.4

  - ### getAllSourceDirs

    @Internal public FileCollection getAllSourceDirs()
    Gets the source directories for the classes that will be reported on. Source will be obtained from these directories only for the classes included in the report.
    Returns:
      source directories for the classes reported on
    Since:
      3.4
    See Also:
      - `getAllClassDirs()`

  - ### sourceSets

    public void sourceSets(SourceSet... sourceSets)
    Adds a source set to the list to be reported on. The output of this source set will be used as classes to include in the report. The source for this source set will be used for any classes included in the report.
    Parameters:
      `sourceSets` - one or more source sets to report on
    Since:
      3.4

  - ### additionalClassDirs

    public void additionalClassDirs(File... dirs)
    Adds additional class directories to those that will be included in the report.
    Parameters:
      `dirs` - one or more directories containing classes to report coverage of
    Since:
      3.4

  - ### additionalClassDirs

    public void additionalClassDirs(FileCollection dirs)
    Adds additional class directories to those that will be included in the report.
    Parameters:
      `dirs` - a `FileCollection` of directories containing classes to report coverage of
    Since:
      3.4

  - ### additionalSourceDirs

    public void additionalSourceDirs(File... dirs)
    Adds additional source directories to be used for any classes included in the report.
    Parameters:
      `dirs` - one or more directories containing source files for the classes included in the report
    Since:
      3.4

  - ### additionalSourceDirs

    public void additionalSourceDirs(FileCollection dirs)
    Adds additional source directories to be used for any classes included in the report.
    Parameters:
      `dirs` - a `FileCollection` of directories containing source files for the classes included in the report
    Since:
      3.4