Skip to content

Instantly share code, notes, and snippets.

@ricardogarfe
Last active December 17, 2015 03:49
Show Gist options
  • Save ricardogarfe/5546503 to your computer and use it in GitHub Desktop.
Save ricardogarfe/5546503 to your computer and use it in GitHub Desktop.
Android continuous integration using maven travis-ci and mvn-sdk-deployer
language: java
jdk: oraclejdk7
env:
matrix:
# android-16 is always included
- ANDROID_SDKS=android-10 ANDROID_TARGET=android-10 ANDROID_ABI=armeabi
before_install:
# Install base Android SDK
- sudo apt-get update -qq
- if [ `uname -m` = x86_64 ]; then sudo apt-get install -qq --force-yes libgd2-xpm ia32-libs ia32-libs-multiarch > /dev/null; fi
- wget http://dl.google.com/android/android-sdk_r21.1-linux.tgz
- tar xzf android-sdk_r21.1-linux.tgz
- export ANDROID_HOME=$PWD/android-sdk-linux
- export PATH=${PATH}:${ANDROID_HOME}/tools:${ANDROID_HOME}/platform-tools
# Install required components.
# For a full list, run `android list sdk -a --extended`
# Note that sysimg-16 downloads the ARM, x86 and MIPS images (we should optimize this).
# Other relevant API's:
# addon-google_apis-google-16
- android update sdk --filter platform-tools,android-16,extra-android-support,add-on,$ANDROID_SDKS --no-ui --force --all > /dev/null
# Create and start emulator
- echo no | android create avd --force -n test -t 'Google Inc.:Google APIs:10' --abi $ANDROID_ABI
- emulator -avd test -no-skin -no-audio -no-window &
- git clone git://github.com/mosabua/maven-android-sdk-deployer.git
- cd /home/travis/build/ricardogarfe/cercanias-renfe-android/maven-android-sdk-deployer/add-ons/google-apis-10
- mvn install -N --quiet
before_script:
- cd /home/travis/build/ricardogarfe/cercanias-renfe-android/android
- ./wait_for_emulator
script: mvn install -Pintegration-tests -Dandroid.device=test
@zerho
Copy link

zerho commented Sep 12, 2013

does this work on travis-ci.org ?

@hotrod5000
Copy link

what was your outcome? i just figured i would cd into relative directory like:

only thing i found is it wants a version and barks about a source.properties file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment