forked from simpligility/android-maven-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
50 lines (43 loc) · 2.01 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
language: java
jdk: oraclejdk7
env:
matrix:
# android-16 is always included
- ANDROID_SDKS=sysimg-16 ANDROID_TARGET=android-16 ANDROID_ABI=x86
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
# Maven 3.1.1
- wget http://www.us.apache.org/dist/maven/maven-3/3.1.1/binaries/apache-maven-3.1.1-bin.tar.gz
- tar xvf apache-maven-3.1.1-bin.tar.gz > /dev/null
- export MVN_HOME=`pwd`/apache-maven-3.1.1
- export PATH=${MVN_HOME}/bin/:${PATH}
- mvn --version
# 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,$ANDROID_SDKS --no-ui --force > /dev/null
# Create and start emulator
- echo no | android create avd --force -n test -t $ANDROID_TARGET --abi $ANDROID_ABI
- emulator -avd test -no-skin -no-audio -no-window &
before_script:
- ./wait_for_emulator
script: mvn clean install -Dandroid.device=test
after_script:
# Install Android NDK
- NDK_ARCH=""
- if [ `uname -m` = x86_64 ]; then NDK_ARCH=_64; fi
- wget http://dl.google.com/android/ndk/android-ndk-r8e-linux-x86${NDK_ARCH}.tar.bz2
- tar xjf android-ndk-r8e-linux-x86${NDK_ARCH}.tar.bz2
- export ANDROID_NDK_HOME=$PWD/android-ndk-r8e
# Run the samples.
- mkdir target
- git clone git://github.com/jayway/maven-android-plugin-samples.git target/maven-android-plugin-samples
- mvn android:undeploy clean install -B -f target/maven-android-plugin-samples/pom.xml -Dandroid.device=test