When using gradle, you can mention multiple repositories which the build tool (gradle) uses to resolve dependencies mentioned in your project.
repositories {
jcenter()
maven { url 'https://maven.google.com' }
google()
}
In the above scenario, you're mentioning 3 repositories which gradle can use to resolve dependencies—all of which are Maven repositories.
1. jcenter()
- Means the JCenter Maven repository.
- This is a shortcut available in later versions of gradle
2. { url 'https://maven.google.com' }
- This means you are referring a Maven repo hosted at the URL which can be used by gradle to resolve the dependencies.
- If you want, you can actually enter the URL for JCenter and this would be the same as mentioning
jcenter()
in the gradle file.
3. google()
- This means the Google Maven repository
- Similar to the notation
maven()
, this can be used in later versions of gradle only