TaskCollection

API Documentation:TaskCollection
Known Subtypes:
TaskContainer

A TaskCollection contains a set of Task instances, and provides a number of query methods.

Properties

No properties

Methods

MethodDescription
getByName(name)

Locates an object by name, failing if there is no such object.

getByName(name, configureClosure)

Locates an object by name, failing if there is no such object. The given configure closure is executed against the object before it is returned from this method. The object is passed to the closure as its delegate.

getByName(name, configureAction)

Locates an object by name, failing if there is no such object. The given configure action is executed against the object before it is returned from this method.

named(name)
Incubating

Locates a task by name, without triggering its creation or configuration, failing if there is no such object.

named(name, type)
Incubating

Locates a object by name and type, without triggering its creation or configuration, failing if there is no such object.

named(name, type, configurationAction)
Incubating

Locates a object by name and type, without triggering its creation or configuration, failing if there is no such object. The given configure action is executed against the object before it is returned from the provider.

named(name, configurationAction)
Incubating

Locates a object by name, without triggering its creation or configuration, failing if there is no such object. The given configure action is executed against the object before it is returned from the provider.

Script blocks

No script blocks

Method details

T getByName(String name)

Locates an object by name, failing if there is no such object.

T getByName(String name, Closure configureClosure)

Locates an object by name, failing if there is no such object. The given configure closure is executed against the object before it is returned from this method. The object is passed to the closure as its delegate.

T getByName(String name, Action<? super T> configureAction)

Locates an object by name, failing if there is no such object. The given configure action is executed against the object before it is returned from this method.

TaskProvider<T> named(String name)

Note: This method is incubating and may change in a future version of Gradle.

Locates a task by name, without triggering its creation or configuration, failing if there is no such object.

TaskProvider<S> named(String name, Class<S> type)

Note: This method is incubating and may change in a future version of Gradle.

Locates a object by name and type, without triggering its creation or configuration, failing if there is no such object.

TaskProvider<S> named(String name, Class<S> type, Action<? super S> configurationAction)

Note: This method is incubating and may change in a future version of Gradle.

Locates a object by name and type, without triggering its creation or configuration, failing if there is no such object. The given configure action is executed against the object before it is returned from the provider.

TaskProvider<T> named(String name, Action<? super T> configurationAction)

Note: This method is incubating and may change in a future version of Gradle.

Locates a object by name, without triggering its creation or configuration, failing if there is no such object. The given configure action is executed against the object before it is returned from the provider.