public interface ArtifactRepositoryContainer extends NamedDomainObjectList<ArtifactRepository>, org.gradle.util.Configurable<ArtifactRepositoryContainer>
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' }
修飾子とタイプ | フィールドと説明 |
---|---|
static String |
DEFAULT_MAVEN_CENTRAL_REPO_NAME |
static String |
DEFAULT_MAVEN_LOCAL_REPO_NAME |
static String |
MAVEN_CENTRAL_URL |
修飾子とタイプ | メソッドと説明 |
---|---|
boolean |
add(ArtifactRepository repository)
Adds a repository to this container, at the end of the repository sequence.
|
void |
addFirst(ArtifactRepository repository)
Adds a repository to this container, at the start of the repository sequence.
|
void |
addLast(ArtifactRepository repository)
Adds a repository to this container, at the end of the repository sequence.
|
ArtifactRepository |
getAt(String name)
Locates an object by name, failing if there is no such task.
|
ArtifactRepository |
getByName(String name)
Locates an object by name, failing if there is no such object.
|
ArtifactRepository |
getByName(String name,
Closure configureClosure)
Locates an object by name, failing if there is no such object.
|
findAll, matching, matching, withType
addAll, addRule, addRule, findByName, getAsMap, getNamer, getNames, getRules
all, all, whenObjectAdded, whenObjectAdded, whenObjectRemoved, whenObjectRemoved, withType, withType
clear, contains, containsAll, equals, hashCode, isEmpty, iterator, parallelStream, remove, removeAll, removeIf, retainAll, size, spliterator, stream, toArray, toArray
add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray
boolean add(ArtifactRepository repository)
add
インタフェース内 Collection<ArtifactRepository>
add
インタフェース内 List<ArtifactRepository>
add
インタフェース内 NamedDomainObjectCollection<ArtifactRepository>
repository
- The repository to add.true
if the item was added, or false if an item with the same name already exists.void addFirst(ArtifactRepository repository)
repository
- The repository to add.void addLast(ArtifactRepository repository)
repository
- The repository to add.ArtifactRepository getByName(String name) throws UnknownRepositoryException
getByName
インタフェース内 NamedDomainObjectCollection<ArtifactRepository>
name
- The object nameUnknownRepositoryException
ArtifactRepository getByName(String name, Closure configureClosure) throws UnknownRepositoryException
getByName
インタフェース内 NamedDomainObjectCollection<ArtifactRepository>
name
- The object nameconfigureClosure
- The closure to use to configure the object.UnknownRepositoryException
ArtifactRepository getAt(String name) throws UnknownRepositoryException
NamedDomainObjectCollection.getByName(String)
. You can call this method in your build script by using the groovy []
operator.getAt
インタフェース内 NamedDomainObjectCollection<ArtifactRepository>
name
- The object nameUnknownRepositoryException