Skip to content

Consume Central with Gradle⚓︎

Gradle has a built-in configuration to access the Central Repository via HTTP as documented in the dependency tutorial.

repositories {
  mavenCentral()
}

To access the Central Repository with Gradle via HTTPS you can define a Maven repository specifying the URL.

repositories {
  maven {
    url "https://repo1.maven.org/maven2"
  }
}