# applyTo

open fun <T : Task?, JavaForkOptions?> applyTo(task: T)(source)

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.

#### Since

2.14

#### Parameters

task

the task to apply Jacoco to.

#### See also

JacocoPluginExtension

open fun <T : Task?, JavaForkOptions?> applyTo(tasks: TaskCollection<T>)(source)

Applies Jacoco to all of the given tasks.

#### Since

1.6

#### Parameters

tasks

the tasks to apply Jacoco to