Schnittstelle ArtifactRepositoryContainer
- Alle Superschnittstellen:
Collection<ArtifactRepository>,Configurable<ArtifactRepositoryContainer>,DomainObjectCollection<ArtifactRepository>,Iterable<ArtifactRepository>,List<ArtifactRepository>,NamedDomainObjectCollection<ArtifactRepository>,NamedDomainObjectList<ArtifactRepository>,SequencedCollection<ArtifactRepository>
- Alle bekannten Unterschnittstellen:
RepositoryHandler
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 = uri('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 = uri('some-url')
}
-
Feldübersicht
Felder -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungbooleanadd(ArtifactRepository repository) Adds a repository to this container, at the end of the repository sequence.voidaddFirst(ArtifactRepository repository) Adds a repository to this container, at the start of the repository sequence.voidaddLast(ArtifactRepository repository) Adds a repository to this container, at the end of the repository sequence.Locates an object by name, failing if there is no such object.Locates an object by name, failing if there is no such object.Locates an object by name, failing if there is no such object.getByName(String name, Action<? super ArtifactRepository> configureAction) Locates an object by name, failing if there is no such object.Von Schnittstelle geerbte Methoden java.util.Collection
parallelStream, removeIf, stream, toArrayVon Schnittstelle geerbte Methoden org.gradle.util.Configurable
configureVon Schnittstelle geerbte Methoden org.gradle.api.DomainObjectCollection
addAllLater, addLater, all, all, configureEach, whenObjectAdded, whenObjectAdded, whenObjectRemoved, whenObjectRemoved, withType, withTypeVon Schnittstelle geerbte Methoden java.util.List
add, addAll, addAll, clear, contains, containsAll, equals, get, getFirst, getLast, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeFirst, removeLast, replaceAll, retainAll, reversed, set, size, sort, spliterator, subList, toArray, toArrayVon Schnittstelle geerbte Methoden org.gradle.api.NamedDomainObjectCollection
addAll, addRule, addRule, addRule, findByName, getAsMap, getCollectionSchema, getNamer, getNames, getRules, named, named, named, named
-
Felddetails
-
DEFAULT_MAVEN_CENTRAL_REPO_NAME
- Siehe auch:
-
DEFAULT_MAVEN_LOCAL_REPO_NAME
- Siehe auch:
-
MAVEN_CENTRAL_URL
- Siehe auch:
-
GOOGLE_URL
- Siehe auch:
-
-
Methodendetails
-
add
Adds a repository to this container, at the end of the repository sequence.- Angegeben von:
addin SchnittstelleCollection<ArtifactRepository>- Angegeben von:
addin SchnittstelleList<ArtifactRepository>- Angegeben von:
addin SchnittstelleNamedDomainObjectCollection<ArtifactRepository>- Parameter:
repository- The repository to add.- Gibt zurück:
trueif the item was added, or false if an item with the same name already exists.
-
addFirst
Adds a repository to this container, at the start of the repository sequence.- Angegeben von:
addFirstin SchnittstelleList<ArtifactRepository>- Angegeben von:
addFirstin SchnittstelleSequencedCollection<ArtifactRepository>- Parameter:
repository- The repository to add.
-
addLast
Adds a repository to this container, at the end of the repository sequence.- Angegeben von:
addLastin SchnittstelleList<ArtifactRepository>- Angegeben von:
addLastin SchnittstelleSequencedCollection<ArtifactRepository>- Parameter:
repository- The repository to add.
-
getByName
Locates an object by name, failing if there is no such object.This operation is eager and will cause the returned element to be realized.
- Angegeben von:
getByNamein SchnittstelleNamedDomainObjectCollection<ArtifactRepository>- Parameter:
name- The object name- Gibt zurück:
- The object with the given name. Never returns null.
- Löst aus:
UnknownRepositoryException
-
getByName
ArtifactRepository getByName(String name, @DelegatesTo(ArtifactRepository.class) Closure configureClosure) throws UnknownRepositoryException 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.This operation is eager and will cause the returned element to be realized.
- Angegeben von:
getByNamein SchnittstelleNamedDomainObjectCollection<ArtifactRepository>- Parameter:
name- The object nameconfigureClosure- The closure to use to configure the object.- Gibt zurück:
- The object with the given name, after the configure closure has been applied to it. Never returns null.
- Löst aus:
UnknownRepositoryException
-
getByName
ArtifactRepository getByName(String name, Action<? super ArtifactRepository> configureAction) throws UnknownRepositoryException Locates an object by name, failing if there is no such object. The given configure action is executed against the object before it is returned from this method.This operation is eager and will cause the returned element to be realized.
- Angegeben von:
getByNamein SchnittstelleNamedDomainObjectCollection<ArtifactRepository>- Parameter:
name- The object nameconfigureAction- The action to use to configure the object.- Gibt zurück:
- The object with the given name, after the configure action has been applied to it. Never returns null.
- Löst aus:
UnknownRepositoryException
-
getAt
Locates an object by name, failing if there is no such object. This method is identical toNamedDomainObjectCollection.getByName(String). You can call this method in your build script by using the groovy[]operator.This operation is eager and will cause the returned element to be realized.
- Angegeben von:
getAtin SchnittstelleNamedDomainObjectCollection<ArtifactRepository>- Parameter:
name- The object name- Gibt zurück:
- The object with the given name. Never returns null.
- Löst aus:
UnknownRepositoryException
-