Overview | Package | Class | Deprecated | Index | Help
| Groovy Documentation
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | PROPERTY | CONSTR | METHOD | DETAIL: FIELD | PROPERTY | CONSTR | METHOD

## org.gradle.testing.jacoco.plugins
[Groovy] Class JacocoPluginExtension

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

    @Incubating
    class JacocoPluginExtension

Extension including common properties and methods for Jacoco.

Field Summary
`protected Project` | `project`

Property Summary
`static String` | `TASK_EXTENSION_NAME`
`Logger` | `logger`
`File` | `reportsDir` The directory where reports will be generated.
`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 Object
wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll

Field Detail

### project

    protected final Project project

Property Detail

### TASK_EXTENSION_NAME

    static final String TASK_EXTENSION_NAME

### logger

    Logger logger

### reportsDir

    File reportsDir

  The directory where reports will be generated.

### toolVersion

    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)

Gradle API 1.10