@Incubating public class JacocoPluginExtension extends Object
Modifier and Type | Field and Description |
---|---|
protected Project |
project |
static String |
TASK_EXTENSION_NAME |
Constructor and Description |
---|
JacocoPluginExtension(Project project,
org.gradle.internal.jacoco.JacocoAgentJar agent)
Creates a Jacoco plugin extension.
|
Modifier and Type | Method and Description |
---|---|
<T extends Task & JavaForkOptions> |
applyTo(T task)
Applies Jacoco to the given task.
|
<T extends Task & JavaForkOptions> |
applyTo(TaskCollection tasks)
Applies Jacoco to all of the given tasks.
|
Logger |
getLogger()
Deprecated.
logger should be considered final.
|
File |
getReportsDir()
The directory where reports will be generated.
|
String |
getToolVersion()
Version of Jacoco JARs to use.
|
void |
setLogger(Logger logger)
Deprecated.
logger should be considered final.
|
void |
setReportsDir(File reportsDir) |
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()
public void setReportsDir(File reportsDir)
public <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 tasks)
tasks
- the tasks to apply Jacoco to@Deprecated public Logger getLogger()
@Deprecated public void setLogger(Logger logger)