@Incubating class JacocoReport extends JacocoBase
Task to generate HTML, Xml and CSV reports of Jacoco coverage data.
Type | Name and description |
---|---|
FileCollection |
additionalClassDirs Additional class dirs that coverage data should be reported for. |
FileCollection |
additionalSourceDirs Additional source dirs for the classes coverage data is being reported for. |
FileCollection |
classDirectories Source sets that coverage should be reported for. |
FileCollection |
executionData Collection of execution data files to analyze. |
FileCollection |
sourceDirectories Source sets that coverage should be reported for. |
Constructor and description |
---|
JacocoReport
() |
Type | Name and 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. |
void |
generate() |
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. |
protected IsolatedAntBuilder |
getAntBuilder() |
protected Instantiator |
getInstantiator() |
JacocoReportsContainer |
getReports() Returns the reports to be generated by this task. |
JacocoReportsContainer |
reports(Closure closure) Configures the reports to be generated by this task. |
void |
sourceSets(SourceSet... sourceSets) Adds a source set to the list to be reported on. |
Additional class dirs that coverage data should be reported for.
Additional source dirs for the classes coverage data is being reported for.
Source sets that coverage should be reported for.
Collection of execution data files to analyze.
Source sets that coverage should be reported for.
Adds additional class directories to those that will be included in the report.
dirs
- one or more directories containing
classes to report coverage ofAdds additional class directories to those that will be included in the report.
dirs
- a FileCollection
of directories
containing classes to report coverage ofAdds additional source directories to be used for any classes included in the report.
dirs
- one or more directories containing
source files for the classes included in the reportAdds additional source directories to be used for any classes included in the report.
dirs
- a FileCollection
of directories
containing source files for the classes included in
the reportAdds execution data files to be used during coverage analysis.
files
- one or more files to addAdds 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.
tasks
- one or more tasks to addAdds 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.
tasks
- one or more tasks to addGets the class directories that coverage will be reported for. All classes in these directories will be included in the report.
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 the reports to be generated by this task.
Configures the reports to be generated by this task.
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.
sourceSets
- one or more source sets to report onGradle API 2.0