JacocoPluginExtension (Gradle API 2.14.1)

Package: org.gradle.testing.jacoco.plugins

## [Java] Class JacocoPluginExtension

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

- Extension including common properties and methods for Jacoco.

- - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `static String` | `TASK_EXTENSION_NAME` |
    `protected Project` | `project` |

  - ### Constructor Summary

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

  - ### Methods Summary

    Methods
    Type | Name and description
    --- | ---
    `void` | `applyTo(T task)` Applies Jacoco to the given task.
    `void` | `applyTo(TaskCollection tasks)` Applies Jacoco to all of the given tasks.
    `Logger` | `getLogger()` Logger
    `File` | `getReportsDir()` The directory where reports will be generated.
    `static String` | `getTASK_EXTENSION_NAME()`
    `String` | `getToolVersion()` Version of Jacoco JARs to use.
    `void` | `setLogger(Logger logger)` Logger
    `void` | `setReportsDir(File reportsDir)`
    `void` | `setToolVersion(String toolVersion)`

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class groovy.lang.GroovyObjectSupport` | `groovy.lang.GroovyObjectSupport#setProperty(java.lang.String, java.lang.Object), groovy.lang.GroovyObjectSupport#getProperty(java.lang.String), groovy.lang.GroovyObjectSupport#invokeMethod(java.lang.String, java.lang.Object), groovy.lang.GroovyObjectSupport#setMetaClass(groovy.lang.MetaClass), groovy.lang.GroovyObjectSupport#getMetaClass(), groovy.lang.GroovyObjectSupport#wait(long, int), groovy.lang.GroovyObjectSupport#wait(long), groovy.lang.GroovyObjectSupport#wait(), groovy.lang.GroovyObjectSupport#equals(java.lang.Object), groovy.lang.GroovyObjectSupport#toString(), groovy.lang.GroovyObjectSupport#hashCode(), groovy.lang.GroovyObjectSupport#getClass(), groovy.lang.GroovyObjectSupport#notify(), groovy.lang.GroovyObjectSupport#notifyAll()`
    `class Object` | `wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll`

- - ### Field Detail

    - #### public static final String TASK_EXTENSION_NAME

    - #### protected final Project project

  - ### Constructor Detail

    - #### public JacocoPluginExtension(Project project, org.gradle.internal.jacoco.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

    - #### public void applyTo(T task)

      Applies Jacoco to the given task. Configuration options will be provided on a task extension named 'jacoco'. Jacoco will be run as an agent during the execution of the task.

      Parameters:
        `task` - the task to apply Jacoco to.
      See Also:
        JacocoPluginExtension.TASK_EXTENSION_NAME

    - #### public void applyTo(TaskCollection tasks)

      Applies Jacoco to all of the given tasks.

      Parameters:
        `tasks` - the tasks to apply Jacoco to

    - #### @Deprecated public Logger getLogger()

      Logger

      deprecated:
        logger should be considered final.

    - #### public File getReportsDir()

      The directory where reports will be generated.

    - #### public static String getTASK_EXTENSION_NAME()

    - #### public String getToolVersion()

      Version of Jacoco JARs to use.

    - #### @Deprecated public void setLogger(Logger logger)

      Logger

      deprecated:
        logger should be considered final.

    - #### public void setReportsDir(File reportsDir)

    - #### public void setToolVersion(String toolVersion)