public class TaskFactory extends Object
org.gradle.api.tasks.TaskContainer#register API if available. As the
created task is required during the configuration phase, the registered task is realized immediately.| Modifier and Type | Class and Description |
|---|---|
protected static interface |
TaskFactory.Dispatcher
A dispatcher for using the
org.gradle.api.tasks.TaskContainer#register API if available. |
| Modifier and Type | Method and Description |
|---|---|
static <T extends Task> |
create(Project project,
String name,
Class<T> type)
Creates a task of the supplied type for the supplied project.
|
public static <T extends Task> T create(Project project, String name, Class<T> type)
T - The type of the created task.project - The Gradle project to use.name - The name of the task to create.type - The type of the task to create.