Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between google() and maven { url 'https://maven.google.com' }

Is there any difference between google() and maven { url 'https://maven.google.com' } in build.gradle file and if there is any, what is it?

allprojects {     repositories {         jcenter()         maven { url 'https://maven.google.com' }         // OR         google()     } } 
like image 591
Amit Kumar Avatar asked Sep 28 '17 11:09

Amit Kumar


People also ask

What is google () in the gradle?

The google() repository is a shortcut to Google's maven repository. It was introduced in Gradle 4. x+. The actual repository URL used is `"https://dl.google.com/dl/android/maven2/" as specified here. https://maven.google.com actually points to the same repository.

What is maven google?

There are several repositories in play when building an Android app: jcenter() is used for a multitude of open source libraries, including the Android Plugin for Gradle. google() (a.k.a., maven.google.com ) is used for the support libraries, Architecture Components, and so on.

Does google use maven?

Google won the Maven contract in late 2017, just before Schmidt stepped down as Alphabet's chair. There were Googlers who disagreed with the project from the start.

What is the maven repo URL?

A default installation of Nexus Repository Manager includes a proxy repository configured to access the Central Repository via HTTPS using the URL https://repo1.maven.org/maven2/ .


1 Answers

The google() repository is a shortcut to Google's maven repository. It was introduced in Gradle 4.x+. The actual repository URL used is `"https://dl.google.com/dl/android/maven2/" as specified here. https://maven.google.com actually points to the same repository.

However, if you are planning to use the google() shortcut, you need Gradle 4.x+, Android Studio 3.x+ and Gradle plugin for Android 3.x+.

like image 126
Jayson Chacko Avatar answered Sep 30 '22 13:09

Jayson Chacko