Package: org.gradle.api.artifacts

## [Java] Interface ArtifactRepositoryContainer

- org.gradle.api.NamedDomainObjectCollection

- All Superinterfaces:
    Iterable, NamedDomainObjectList, DomainObjectCollection, Collection, NamedDomainObjectCollection

  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'
       }

- - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `String` | `DEFAULT_MAVEN_CENTRAL_REPO_NAME` |
    `String` | `DEFAULT_MAVEN_LOCAL_REPO_NAME` |
    `String` | `MAVEN_CENTRAL_URL` |

  - ### Methods Summary

    Methods
    Type | Name and description
    --- | ---
    `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)` {@inheritDoc}
    `ArtifactRepository` | `getByName(String name)` {@inheritDoc}
    `ArtifactRepository` | `getByName(String name, groovy.lang.Closure configureClosure)` {@inheritDoc}

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `interface NamedDomainObjectList` | `findAll, matching, matching, withType`
    `interface org.gradle.util.Configurable` | `org.gradle.util.Configurable#configure(groovy.lang.Closure)`

- - ### Field Detail

    - #### public String DEFAULT_MAVEN_CENTRAL_REPO_NAME

    - #### public String DEFAULT_MAVEN_LOCAL_REPO_NAME

    - #### public String MAVEN_CENTRAL_URL

  - ### Method Detail

    - #### public boolean add(ArtifactRepository repository)

      Adds a repository to this container, at the end of the repository sequence.

      Parameters:
        `repository` - The repository to add.

    - #### public void addFirst(ArtifactRepository repository)

      Adds a repository to this container, at the start of the repository sequence.

      Parameters:
        `repository` - The repository to add.

    - #### public void addLast(ArtifactRepository repository)

      Adds a repository to this container, at the end of the repository sequence.

      Parameters:
        `repository` - The repository to add.

    - #### public ArtifactRepository getAt(String name)

      {@inheritDoc}

    - #### public ArtifactRepository getByName(String name)

      {@inheritDoc}

    - #### public ArtifactRepository getByName(String name, groovy.lang.Closure configureClosure)

      {@inheritDoc}