Groovy Documentation

org.ajoberstar.gradle.jacoco.plugins
[Groovy] Class JacocoPluginExtension

java.lang.Object
  org.ajoberstar.gradle.jacoco.plugins.JacocoPluginExtension

@Slf4j
class JacocoPluginExtension

Extension including common properties and methods for Jacoco.


Field Summary
protected Project project

 
Property Summary
static java.lang.String TASK_EXTENSION_NAME

java.lang.String toolVersion

Version of Jacoco JARs to use.

 
Constructor Summary
JacocoPluginExtension(Project project, JacocoAgentJar agent)

Creates a Jacoco plugin extension.

 
Method Summary
void applyTo(JavaForkOptions task)

Applies Jacoco to the given task.

void applyTo(TaskCollection tasks)

Applies Jacoco to all of the given tasks.

 
Methods inherited from class java.lang.Object
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()
 

Field Detail

project

protected final Project project


 
Property Detail

TASK_EXTENSION_NAME

static final java.lang.String TASK_EXTENSION_NAME


toolVersion

java.lang.String toolVersion
Version of Jacoco JARs to use.


 
Constructor Detail

JacocoPluginExtension

JacocoPluginExtension(Project project, JacocoAgentJar agent)
Creates a Jacoco plugin extension.
Parameters:
project - the project the extension is attached to
agent - the agent JAR to be used by Jacoco


 
Method Detail

applyTo

void applyTo(JavaForkOptions task)
Applies Jacoco to the given task. Configuration options will be provided on a task extension named TASK_EXTENSION_NAME. Jacoco will be run as an agent during the execution of the task.
Parameters:
task - the task to apply Jacoco to.


applyTo

void applyTo(TaskCollection tasks)
Applies Jacoco to all of the given tasks.
Parameters:
tasks - the tasks to apply Jacoco to
See Also:
applyTo(JavaForkOptions)


 

Groovy Documentation