A blank android project that has maven support with some frecuently used dependencies in android:
- ActionBarSherlock
- Google maps Android API v2
- Google Analytics
- RoboGuice (Dependency Injection)
- RoboElectric (Testing)
- Facebok SDK
By default, the pom.xml file has a repository configured, that is pointing to a public dropbox directory where I have uploaded all the dependencies needed.
You don´t need to do anything to use this option. Just understand that maybe some day this directory won´t exist.
If you import this project in Android Studio it should work without doing anything.
Delete my repository from the pom.xml and follow the same steps that I did to generate the dependencies in my local repository.
Go to this link and follow the steps: maven-android-sdk-deployer
If you are not going to use all the dependencies listed above, delete them from the pom.xml
If you want to generate the debug apk, just execute:
mvn clean package
The apk will be generated in the target/ directory.
If you want to generate a signed apk, ready to be uploaded to the Play Store, first you have to configure the following properties in pom.xml
<keystore.location>keystore_MODIFYME</keystore.location>
<keystore.storepass>storepass_MODIFYME</keystore.storepass>
<keystore.keypass>keypass_MODIFYME</keystore.keypass>
<keystore.alias>alias_MODIFYME</keystore.alias>
Then execute:
mvn clean package -Psign
In the target/ directory there will be a new apk with the suffix '-signed-aligned.apk'. This is the apk you will have to upload to the Play Store.