public class JacocoPluginExtension extends Object
Modifier and Type | Field | Description |
---|---|---|
protected Project |
project |
Deprecated.
|
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() |
Deprecated.
|
DirectoryProperty |
getReportsDirectory() |
The directory where reports will be generated.
|
String |
getToolVersion() |
Version of Jacoco JARs to use.
|
void |
setReportsDir(File reportsDir) |
Deprecated.
|
void |
setReportsDir(Provider<File> reportsDir) |
Deprecated.
|
void |
setToolVersion(String toolVersion) |
public static final String TASK_EXTENSION_NAME
@Deprecated 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 DirectoryProperty getReportsDirectory()
@Deprecated public File getReportsDir()
@Deprecated public void setReportsDir(Provider<File> reportsDir)
reportsDir
- Reports directory provider@Deprecated public void setReportsDir(File reportsDir)
reportsDir
- Reports directorypublic <T extends Task & JavaForkOptions> void applyTo(T task)
task
- the task to apply Jacoco to.TASK_EXTENSION_NAME
public <T extends Task & JavaForkOptions> void applyTo(TaskCollection<T> tasks)
tasks
- the tasks to apply Jacoco to