api / org.gradle.testing.jacoco.tasks / JacocoReport

JacocoReport

@CacheableTask @Incubating open class JacocoReport : JacocoReportBase, Reporting<JacocoReportsContainer>

Task to generate HTML, Xml and CSV reports of Jacoco coverage data.

Constructors

<init>

JacocoReport()

Functions

generate

open fun generate(): Unit

getReports

open fun getReports(): JacocoReportsContainer

Returns the reports to be generated by this task.

reports

open fun reports(closure: Closure<Any>): JacocoReportsContainer

Configures the reports to be generated by this task.

open fun reports(configureAction: Action<in JacocoReportsContainer>): JacocoReportsContainer

Inherited Functions

additionalClassDirs

open fun additionalClassDirs(vararg dirs: File): Unit
open fun additionalClassDirs(dirs: FileCollection): Unit

Adds additional class directories to those that will be included in the report.

additionalSourceDirs

open fun additionalSourceDirs(vararg dirs: File): Unit
open fun additionalSourceDirs(dirs: FileCollection): Unit

Adds additional source directories to be used for any classes included in the report.

executionData

open fun executionData(vararg files: Any): Unit

Adds execution data files to be used during coverage analysis.

open fun executionData(vararg tasks: Task): Unit

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.

open fun executionData(tasks: TaskCollection<Task>): Unit

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.

getAdditionalClassDirs

open fun getAdditionalClassDirs(): FileCollection

Additional class dirs that coverage data should be reported for.

getAdditionalSourceDirs

open fun getAdditionalSourceDirs(): FileCollection

Additional source dirs for the classes coverage data is being reported for.

getAllClassDirs

open fun getAllClassDirs(): FileCollection

Gets the class directories that coverage will be reported for. All classes in these directories will be included in the report.

getAllSourceDirs

open fun getAllSourceDirs(): FileCollection

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.

getClassDirectories

open fun getClassDirectories(): FileCollection

Source sets that coverage should be reported for.

getExecutionData

open fun getExecutionData(): FileCollection

Collection of execution data files to analyze.

getSourceDirectories

open fun getSourceDirectories(): FileCollection

Source sets that coverage should be reported for.

setAdditionalClassDirs

open fun setAdditionalClassDirs(additionalClassDirs: FileCollection): Unit

setAdditionalSourceDirs

open fun setAdditionalSourceDirs(additionalSourceDirs: FileCollection): Unit

setClassDirectories

open fun setClassDirectories(classDirectories: FileCollection): Unit

setExecutionData

open fun setExecutionData(executionData: FileCollection): Unit

setSourceDirectories

open fun setSourceDirectories(sourceDirectories: FileCollection): Unit

sourceSets

open fun sourceSets(vararg sourceSets: SourceSet): Unit

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.