- All Superinterfaces:
Collection<Task>, Configurable<NamedDomainObjectContainer<Task>>, DomainObjectCollection<Task>, DomainObjectSet<Task>, Iterable<Task>, NamedDomainObjectCollection<Task>, NamedDomainObjectContainer<Task>, NamedDomainObjectSet<Task>, PolymorphicDomainObjectContainer<Task>, Set<Task>, TaskCollection<Task>
-
Method Summary
Deprecated.
Deprecated.
<T extends Task>
TDeprecated.
<T extends Task>
TDeprecated.
<T extends Task>
TDeprecated.
Deprecated.
Deprecated.
Deprecated.
Locates a task by path.
Locates a task by path.
Defines a new task, which will be created when it is required.
Defines a new task, which will be created when it is required.
Defines a new task, which will be created when it is required passing the given arguments to the
@Inject-annotated constructor.Defines a new task, which will be created and configured when it is required.
Defines a new task, which will be created and configured when it is required.
Creates a
Taskwith the given name and adds it to this container, replacing any existing task with the same name.<T extends Task>
TCreates a
Taskwith the given name and type, and adds it to this container, replacing any existing task of the same name.Methods inherited from interface DomainObjectCollection
addAllLater, addLater, all, all, configureEach, disallowChanges, getElements, whenObjectAdded, whenObjectAdded, whenObjectRemoved, whenObjectRemoved, withType, withTypeMethods inherited from interface NamedDomainObjectCollection
add, addAll, addRule, addRule, addRule, findByName, getAsMap, getByName, getCollectionSchema, getNamer, getNames, getRulesMethods inherited from interface Set
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, spliterator, toArray, toArrayMethods inherited from interface TaskCollection
getAt, getByName, getByName, matching, matching, named, named, named, named, named, whenTaskAdded, whenTaskAdded, withType
-
Method Details
-
findByPath
-
getByPath
-
create
Deprecated.
Creates a
Taskand adds it to this container. A map of creation options can be passed to this method to control how the task is created. The following options are available:Permitted map keys Option Description Default Value "name"The name of the task to create. None. Must be specified. "type"The class of the task to create. DefaultTask"action"The closure or Actionto execute when the task executes. SeeTask.doFirst(Action).null"overwrite"Replace an existing task? false"dependsOn"The dependencies of the task. See here for more details. []"group"The group of the task. null"description"The description of the task. null"constructorArgs"The arguments to pass to the task class constructor. nullAfter the task is added, it is made available as a property of the project, so that you can reference the task by name in your build file.
If a task with the given name already exists in this container and the
"overwrite"option is not set to true, an exception is thrown.- Parameters:
options- The task creation options.- Returns:
- The newly created task object
- Throws:
InvalidUserDataException- If a task with the given name already exists in this project.NullPointerException- If any of the values in"constructorArgs"is null.- See Also:
-
create
-
create
-
create
-
create
-
create
-
create
-
create
-
register
-
register
-
register
-
register
-
register
-
replace
-
replace
-