api / org.gradle.testing.jacoco.plugins / JacocoPluginExtension / applyTo

applyTo

open fun <T> applyTo(task: T): Unit where T : Task, T : JavaForkOptions

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

open fun <T> applyTo(tasks: TaskCollection<T>): Unit where T : Task, T : JavaForkOptions

Applies Jacoco to all of the given tasks.

Parameters

tasks - the tasks to apply Jacoco to