Package: org.gradle.testing.jacoco.plugins

## [Groovy] Class JacocoPluginExtension

- org.gradle.testing.jacoco.plugins.JacocoPluginExtension

- Extension including common properties and methods for Jacoco.

- - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `protected Project` | `project` |

  - ### Properties Summary

    Properties
    Type | Name and description
    --- | ---
    `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

    Constructors
    Constructor and description
    `JacocoPluginExtension (Project project, JacocoAgentJar agent)` Creates a Jacoco plugin extension.

  - ### Methods Summary

    Methods
    Type | Name and description
    --- | ---
    `void` | `applyTo(JavaForkOptions task)` Applies Jacoco to the given task.
    `void` | `applyTo(TaskCollection tasks)` Applies Jacoco to all of the given tasks.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class Object` | `wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll`

- - ### Field Detail

    - #### protected final Project project

  - ### Property Detail

    - #### static final String TASK_EXTENSION_NAME

    - #### Logger logger

    - #### File reportsDir

      The directory where reports will be generated.

    - #### String toolVersion

      Version of Jacoco JARs to use.

  - ### Constructor Detail

    - #### 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

    - #### 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.

    - #### void applyTo(TaskCollection tasks)

      Applies Jacoco to all of the given tasks.

      Parameters:
        `tasks` - the tasks to apply Jacoco to
      See Also:
        applyTo(JavaForkOptions)