|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface ConfigurationContainer
A ConfigurationContainer is responsible for managing a set of Configuration instances.
You can obtain a ConfigurationContainer instance by calling Project.getConfigurations(),
or using the configurations property in your build script.
The configurations in a container are accessable as read-only properties of the container, using the name of the configuration as the property name. For example:
configurations.add('myConfiguration')
configurations.myConfiguration.transitive = false
A dynamic method is added for each configuration which takes a configuration closure. This is equivalent to
calling getByName(String, groovy.lang.Closure). For example:
configurations.add('myConfiguration')
configurations.myConfiguration {
transitive = false
}
| Method Summary | |
|---|---|
Configuration |
add(String name)
Adds a configuration with the given name. |
Configuration |
add(String name,
Closure configureClosure)
Adds a configuration with the given name. |
Configuration |
detachedConfiguration(Dependency... dependencies)
Creates a configuration, but does not add it to this container. |
Configuration |
getAt(String name)
Locates an object by name, failing if there is no such task. |
Configuration |
getByName(String name)
Locates an object by name, failing if there is no such object. |
Configuration |
getByName(String name,
Closure configureClosure)
Locates an object by name, failing if there is no such object. |
| Methods inherited from interface org.gradle.api.NamedDomainObjectContainer |
|---|
addRule, addRule, getRules |
| Methods inherited from interface org.gradle.api.NamedDomainObjectCollection |
|---|
findByName, getAsMap, matching, matching, withType |
| Methods inherited from interface org.gradle.api.DomainObjectCollection |
|---|
all, all, allObjects, allObjects, findAll, getAll, whenObjectAdded, whenObjectAdded, whenObjectRemoved, withType, withType |
| Methods inherited from interface java.lang.Iterable |
|---|
iterator |
| Method Detail |
|---|
Configuration getByName(String name)
throws UnknownConfigurationException
getByName in interface NamedDomainObjectCollection<Configuration>name - The object name
UnknownConfigurationException
Configuration getAt(String name)
throws UnknownConfigurationException
NamedDomainObjectCollection.getByName(String). You can call this method in your build script by using the groovy [] operator.
getAt in interface NamedDomainObjectCollection<Configuration>name - The object name
UnknownConfigurationException
Configuration getByName(String name,
Closure configureClosure)
throws UnknownConfigurationException
getByName in interface NamedDomainObjectCollection<Configuration>name - The object nameconfigureClosure - The closure to use to configure the object.
UnknownConfigurationException
Configuration add(String name)
throws InvalidUserDataException
name - The name of the new configuration.
InvalidUserDataException - when a configuration with the given name already exists in this container.
Configuration add(String name,
Closure configureClosure)
throws InvalidUserDataException
name - The name of the new configuration.configureClosure - The closure to use to configure the configuration.
InvalidUserDataException - when a configuration with the given name already exists in this container.Configuration detachedConfiguration(Dependency... dependencies)
dependencies - The dependencies of the configuration.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||