public class JacocoPluginExtension extends Object
| Modifier and Type | Field | Description | 
|---|---|---|
| protected Project | project | |
| static String | TASK_EXTENSION_NAME | 
| Constructor | Description | 
|---|---|
| JacocoPluginExtension(Project project,
                     org.gradle.internal.jacoco.JacocoAgentJar agent) | Creates a Jacoco plugin extension. | 
| Modifier and Type | Method | Description | 
|---|---|---|
| <T extends Task & JavaForkOptions> | applyTo(TaskCollection<T> tasks) | Applies Jacoco to all of the given tasks. | 
| <T extends Task & JavaForkOptions> | applyTo(T task) | Applies Jacoco to the given task. | 
| File | getReportsDir() | The directory where reports will be generated. | 
| String | getToolVersion() | Version of Jacoco JARs to use. | 
| void | setReportsDir(File reportsDir) | |
| void | setReportsDir(Provider<File> reportsDir) | Set the provider for calculating the report directory. | 
| void | setToolVersion(String toolVersion) | 
public static final String TASK_EXTENSION_NAME
protected final Project project
public JacocoPluginExtension(Project project, org.gradle.internal.jacoco.JacocoAgentJar agent)
project - the project the extension is attached toagent - the agent JAR to be used by Jacocopublic String getToolVersion()
public void setToolVersion(String toolVersion)
public File getReportsDir()
@Incubating public void setReportsDir(Provider<File> reportsDir)
reportsDir - Reports directory providerpublic void setReportsDir(File reportsDir)
public <T extends Task & JavaForkOptions> void applyTo(T task)
task - the task to apply Jacoco to.TASK_EXTENSION_NAMEpublic <T extends Task & JavaForkOptions> void applyTo(TaskCollection<T> tasks)
tasks - the tasks to apply Jacoco to