Repositories - pford68/gradle-examples GitHub Wiki
To add a repository to the build, you list in the repositories closure:
repositories {
mavenCentral()
}
Repository Table
| Repository | Value | Description |
|---|---|---|
| Maven Central | mavenCentral() | http://repo1.maven.org/maven2 |
| Bintray's JCenter | jCenter() | An up-to-date collection of all popular Maven and Bintray artifacts |
| Your local repo | mavenLocal() | Use this for using the output of one subproject in another |
Custom repositories
To use a different repository from those listed above, add it to the repositories closure by adding:
- The type of repo it is (e.g.,
mavenorivy) - The URL for the repo
repositories {
maven {
url "http://repo.mycompany.com/maven2"
}
}
To add login credentials to such a repository:
repositories {
maven {
credentials {
username "myusername"
password "password"
}
url "http://someurl/repo"
}
}