|
Groovy Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | METHOD | DETAIL: FIELD | METHOD |
org.gradle.api.NamedDomainObjectSetorg.gradle.api.artifacts.ConfigurationContainer
java.lang.Iterable
org.gradle.api.DomainObjectCollection
org.gradle.api.NamedDomainObjectCollection
java.util.Collection
org.gradle.api.NamedDomainObjectContainer
public interface ConfigurationContainer extends NamedDomainObjectContainer
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(java.lang.String name)
Adds a configuration with the given name. |
Configuration
|
add(java.lang.String name, groovy.lang.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(java.lang.String name)
{@inheritDoc} |
Configuration
|
getByName(java.lang.String name)
{@inheritDoc} |
Configuration
|
getByName(java.lang.String name, groovy.lang.Closure configureClosure)
{@inheritDoc} |
Methods inherited from interface NamedDomainObjectContainer | |
---|---|
configure, create, create |
Methods inherited from interface NamedDomainObjectSet | |
---|---|
findAll, matching, matching, withType |
Methods inherited from interface org.gradle.util.Configurable | |
---|---|
org.gradle.util.Configurable#configure(groovy.lang.Closure) |
Methods inherited from class java.lang.Object | |
---|---|
java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Method Detail |
---|
public Configuration add(java.lang.String name)
name
- The name of the new configuration.
public Configuration add(java.lang.String name, groovy.lang.Closure configureClosure)
name
- The name of the new configuration.configureClosure
- The closure to use to configure the configuration.
public Configuration detachedConfiguration(Dependency dependencies)
dependencies
- The dependencies of the configuration.
public Configuration getAt(java.lang.String name)
public Configuration getByName(java.lang.String name)
public Configuration getByName(java.lang.String name, groovy.lang.Closure configureClosure)
Groovy Documentation