Somebody can give me a step by step tutorial about how can I use google play services in a maven project? I\'ve added two dependencies
You can use the Android Maven SDK Deployer for more than just Google Play Services
Btw you should use version 13.0.0 and not 4
<dependency>
<groupId>com.google.android.gms</groupId>
<artifactId>google-play-services</artifactId>
<version>13.0.0</version>
<type>apklib</type>
</dependency>
<dependency>
<groupId>com.google.android.gms</groupId>
<artifactId>google-play-services</artifactId>
<version>13.0.0</version>
</dependency>
With android-maven-plugin 3.8.2 you can also use the play services aar
<dependency>
<groupId>com.google.android.gms</groupId>
<artifactId>play-services</artifactId>
<version>4.0.30</version>
<type>aar</type>
</dependency>
Checkout the link given by Jake Wharton. It requires 2 steps. In the first you deploy the artifact to the local maven repository and then reference it from within you app/pom.xml
https://github.com/JakeWharton/gms-mvn-install
HTH
After importing the google-play-services_lib project into your Eclipse workspace and making it a library you need to setup the maven build process.
Make a zip file of the "google-play-services_lib" folder and call it "google-play-services_lib.apklib"
+ google-play-services_lib.apklib
+ src
+ res
+ AndroidManifest.xml
+ project.properties
Open the command prompt and go to the folder where the zip file is and type the following command. This will install the apklib into you local maven repository.
mvn install:install-file -Dfile=google-play-services_lib.apklib -DgroupId=com.google.android.gms -DartifactId=google-play-services -Dversion=14.0.0 -Dpackaging=apklib
Now you need to install the google-play-services jar into your local repository.
mvn install:install-file -Dfile=google-play-services.jar -DgroupId=com.google.android.gms -DartifactId=google-play-services -Dversion=14.0.0 -Dpackaging=jar
Go back into Eclipse and open your android pom file and enter the following dependency
<dependency>
<groupId>com.google.android.gms</groupId>
<artifactId>google-play-services</artifactId>
<version>14.0.0</version>
<type>apklib</type>
</dependency>
<dependency>
<groupId>com.google.android.gms</groupId>
<artifactId>google-play-services</artifactId>
<version>14.0.0</version>
</dependency>
Now you can run your maven package command to have output update with the google play jar and the apklib merged into your apk file.
mvn package -Pandroid -Psign