API Documentation: | DistributionContainer |
---|
Note: This class is incubating and may change in a future version of Gradle.
A DistributionContainer
manages a set of Distribution
objects.
Method | Description |
create(name) | Creates a new item with the given name, adding it to this container. |
create(name, configureClosure) | Creates a new item with the given name, adding it to this container, then configuring it with the given closure. |
create(name, configureAction) | Creates a new item with the given name, adding it to this container, then configuring it with the given action. |
getAt(name) | Locates an object by name, failing if there is no such task. This method is identical to |
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. |
maybeCreate(name) | Looks for an item with the given name, creating and adding it to this container if it does not exist. |
T
create
(String
name)
Creates a new item with the given name, adding it to this container.
Creates a new item with the given name, adding it to this container, then configuring it with the given closure.
Creates a new item with the given name, adding it to this container, then configuring it with the given action.
T
getAt
(String
name)
Locates an object by name, failing if there is no such task. This method is identical to NamedDomainObjectCollection.getByName()
. You can call this method in your build script by using the groovy []
operator.
T
getByName
(String
name)
Locates an object by name, failing if there is no such object.
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
maybeCreate
(String
name)
Looks for an item with the given name, creating and adding it to this container if it does not exist.