Utilities for working with tasks in a consistent manner across Gradle versions.
Type Params | Return Type | Name and description |
---|---|---|
|
void |
named(String taskName, Action<Task> configurator) Configures a task, preferably in a lazy-manner. |
<T extends DefaultTask> |
void |
named(String taskName, Class<T> taskType, Action<T> configurator) Configures a task, preferably in a lazy-manner. |
<T extends DefaultTask> |
void |
register(String taskName, Class<T> taskType, Action<T> configurator) Registers a task in a lazy-manner. |
|
Provider<java.util.List<? extends Task>> |
taskize(Object... taskies) Resolves a maany to tasks items to a provider of tasks. |
|
Provider<java.util.List<? extends Task>> |
taskize(Iterable<Object> taskies) Resolves a maany to tasks items to a provider of tasks. |
|
void |
whenNamed(String taskName, Action<Task> configurator) Adds a configuration for a task, for when a task is created. |
<T extends DefaultTask> |
void |
whenNamed(String taskName, Class<T> taskType, Action<T> configurator) Adds a configuration for a task, for when a task is created. |
Configures a task, preferably in a lazy-manner.
On Gradle 4.9 or earlier it will use getByName
internally.
taskName
- Name of task to configure. Task must have been registered or configured previously.configurator
- Configurating action.Configures a task, preferably in a lazy-manner.
On Gradle 4.9 or earlier it will use getByName
internally.
taskName
- Name of task to configure. Task must have been registered or configured previously.taskType
- Type of task.configurator
- Configurating action.
- Type of task.Registers a task in a lazy-manner.
On Gradle 4.9 or earlier it create the task.
taskName
- Name of task to register. Task must have been registered or configured previously.taskType
- Type of task.configurator
- Configurating action.
- Type of task.Resolves a maany to tasks items to a provider of tasks.
taskies
- Things that can be converted to Task or TaskProviderResolves a maany to tasks items to a provider of tasks.
taskies
- Things that can be converted to Task or TaskProviderAdds a configuration for a task, for when a task is created.
taskName
- Name of task to configure.configurator
- Configurating action.