maven Central
Adds a repository which looks in the Maven central repository for dependencies. The URL used to access this repository is {@value org.gradle.api.artifacts.ArtifactRepositoryContainer#MAVEN_CENTRAL_URL}. The name of the repository is {@value org.gradle.api.artifacts.ArtifactRepositoryContainer#DEFAULT_MAVEN_CENTRAL_REPO_NAME}.
Examples:
repositories {
mavenCentral()
}
Return
the added resolver
See also
Adds a repository which looks in the Maven central repository for dependencies. The URL used to access this repository is {@value org.gradle.api.artifacts.ArtifactRepositoryContainer#MAVEN_CENTRAL_URL}. The name of the repository is {@value org.gradle.api.artifacts.ArtifactRepositoryContainer#DEFAULT_MAVEN_CENTRAL_REPO_NAME}.
Examples:
repositories {
mavenCentral()
}
Return
the added resolver
Since
5.3
Parameters
a configuration action
Deprecated
This method is scheduled to be removed in Gradle 10. Use mavenCentral instead.
Adds a repository which looks in the Maven central repository for dependencies. The URL used to access this repository is {@value org.gradle.api.artifacts.ArtifactRepositoryContainer#MAVEN_CENTRAL_URL}.
The following parameter is accepted as a key for the map:
name | (optional) The name of the repository. The default is {@value org.gradle.api.artifacts.ArtifactRepositoryContainer#DEFAULT_MAVEN_CENTRAL_REPO_NAME} is used as the name. A name must be unique amongst a repository group. |
Return
the added repository
Parameters
Configuration map for the Maven Central repository.