|
Groovy Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | METHOD | DETAIL: FIELD | METHOD |
org.gradle.api.NamedDomainObjectCollection org.gradle.util.Configurable org.gradle.api.DomainObjectCollection java.lang.Iterable org.gradle.api.artifacts.ArtifactRepositoryContainer java.util.Collection org.gradle.api.NamedDomainObjectList
public interface ArtifactRepositoryContainer extends Configurable, NamedDomainObjectList
A ResolverContainer is responsible for managing a set of ArtifactRepository instances. Repositories are arranged in a sequence.
You can obtain a ResolverContainer instance by calling Project.getRepositories or using the repositories property in your build script.
The resolvers in a container are accessible as read-only properties of the container, using the name of the resolver as the property name. For example:
repositories.maven { name 'myResolver' } repositories.myResolver.url = 'some-url'
A dynamic method is added for each resolver which takes a configuration closure. This is equivalent to calling getByName(String, groovy.lang.Closure). For example:
repositories.maven { name 'myResolver' } repositories.myResolver { url 'some-url' }
Method Summary | |
---|---|
boolean
|
add(ArtifactRepository repository)
Adds a repository to this container, at the end of the repository sequence. |
boolean
|
add(DependencyResolver resolver)
Adds a repository to this container, at the end of the repository sequence. |
boolean
|
add(DependencyResolver resolver, Closure configureClosure)
Adds a repository to this container, at the end of the repository sequence. |
DependencyResolver
|
addAfter(Object userDescription, String previousResolver)
Adds a resolver to this container, after the given resolver. |
DependencyResolver
|
addAfter(Object userDescription, String previousResolver, Closure configureClosure)
Adds a resolver to this container, after the given resolver. |
DependencyResolver
|
addBefore(Object userDescription, String nextResolver)
Adds a resolver to this container, before the given resolver. |
DependencyResolver
|
addBefore(Object userDescription, String nextResolver, Closure configureClosure)
Adds a resolver to this container, before the given resolver. |
void
|
addFirst(ArtifactRepository repository)
Adds a repository to this container, at the start of the repository sequence. |
DependencyResolver
|
addFirst(Object userDescription)
Adds a resolver to this container, at the start of the resolver sequence. |
DependencyResolver
|
addFirst(Object userDescription, Closure configureClosure)
Adds a resolver to this container, at the start of the resolver sequence. |
void
|
addLast(ArtifactRepository repository)
Adds a repository to this container, at the end of the repository sequence. |
DependencyResolver
|
addLast(Object userDescription)
Adds a repository to this container, at the end of the repository sequence. |
DependencyResolver
|
addLast(Object userDescription, Closure configureClosure)
Adds a resolver to this container, at the end of the resolver sequence. |
ArtifactRepository
|
getAt(String name)
{@inheritDoc} |
ArtifactRepository
|
getByName(String name)
{@inheritDoc} |
ArtifactRepository
|
getByName(String name, Closure configureClosure)
{@inheritDoc} |
List
|
getResolvers()
Returns the resolvers in this container, in sequence. |
Methods inherited from interface NamedDomainObjectList | |
---|---|
findAll, matching, matching, withType |
Methods inherited from interface NamedDomainObjectCollection | |
---|---|
add, addAll, addRule, addRule, findByName, getAsMap, getAt, getByName, getByName, getNamer, getNames, getRules, matching, matching, withType |
Methods inherited from interface List | |
---|---|
add, add, get, equals, hashCode, indexOf, clear, contains, isEmpty, lastIndexOf, size, subList, toArray, toArray, addAll, addAll, iterator, remove, remove, set, containsAll, listIterator, listIterator, removeAll, retainAll |
Field Detail |
---|
@Deprecated public String DEFAULT_CACHE_ARTIFACT_PATTERN
@Deprecated public String DEFAULT_CACHE_IVY_PATTERN
public String DEFAULT_MAVEN_CENTRAL_REPO_NAME
public String DEFAULT_MAVEN_LOCAL_REPO_NAME
@Deprecated public String INTERNAL_REPOSITORY_NAME
public String MAVEN_CENTRAL_URL
@Deprecated public String MAVEN_REPO_PATTERN
@Deprecated public String RESOLVER_NAME
@Deprecated public String RESOLVER_URL
Method Detail |
---|
public boolean add(ArtifactRepository repository)
repository
- The repository to add.
@Deprecated public boolean add(DependencyResolver resolver)
resolver
- The repository to add, represented as an Ivy DependencyResolver.
@Deprecated public boolean add(DependencyResolver resolver, Closure configureClosure)
resolver
- The repository to add, represented as an Ivy DependencyResolver.configureClosure
- The closure to use to configure the repository.
@Deprecated public DependencyResolver addAfter(Object userDescription, String previousResolver)
userDescription
- The resolver definition. See addLast(Object) for details of this parameter.previousResolver
- The existing resolver to add the new resolver after.
@Deprecated public DependencyResolver addAfter(Object userDescription, String previousResolver, Closure configureClosure)
userDescription
- The resolver definition. See addLast(Object) for details of this parameter.previousResolver
- The existing resolver to add the new resolver after.configureClosure
- The closure to use to configure the resolver.
@Deprecated public DependencyResolver addBefore(Object userDescription, String nextResolver)
userDescription
- The resolver definition. See addLast(Object) for details of this parameter.nextResolver
- The existing resolver to add the new resolver before.
@Deprecated public DependencyResolver addBefore(Object userDescription, String nextResolver, Closure configureClosure)
userDescription
- The resolver definition. See addLast(Object) for details of this parameter.nextResolver
- The existing resolver to add the new resolver before.configureClosure
- The closure to use to configure the resolver.
public void addFirst(ArtifactRepository repository)
repository
- The repository to add.
@Deprecated public DependencyResolver addFirst(Object userDescription)
userDescription
- The resolver definition. See addLast(Object) for details of this parameter.
@Deprecated public DependencyResolver addFirst(Object userDescription, Closure configureClosure)
userDescription
- The resolver definition. See addLast(Object) for details of this parameter.configureClosure
- The closure to use to configure the resolver.
public void addLast(ArtifactRepository repository)
repository
- The repository to add.
@Deprecated public DependencyResolver addLast(Object userDescription)
userDescription
- The resolver definition.
@Deprecated public DependencyResolver addLast(Object userDescription, Closure configureClosure)
userDescription
- The resolver definition. See addLast(Object) for details of this parameter.configureClosure
- The closure to use to configure the resolver.
public ArtifactRepository getAt(String name)
public ArtifactRepository getByName(String name)
public ArtifactRepository getByName(String name, Closure configureClosure)
@Deprecated public List getResolvers()
Gradle API 1.8