Commits

M Haidar Hanif committed 873bb91

Better Maven build handling

Comments (0)

Files changed (1)

 language: java
+jdk: oraclejdk7
+
+env:
+
+    matrix:
+    - ANDROID_SDKS=android-8            ANDROID_TARGET=android-8   ANDROID_ABI=armeabi
+    - ANDROID_SDKS=android-10           ANDROID_TARGET=android-10  ANDROID_ABI=armeabi
+    - ANDROID_SDKS=sysimg-16            ANDROID_TARGET=android-16  ANDROID_ABI=armeabi-v7a
+    - ANDROID_SDKS=android-17,sysimg-17 ANDROID_TARGET=android-17  ANDROID_ABI=armeabi-v7a
 
 before_install:
-  # download the latest Android SDK and extract
-  - wget http://dl.google.com/android/android-sdk_r21.1-linux.tgz
-  - tar -zxf android-sdk_r21.1-linux.tgz
-  - export ANDROID_HOME=`pwd`/android-sdk-linux
-  - export PATH=${PATH}:${ANDROID_HOME}/tools:${ANDROID_HOME}/platform-tools
-  # only update the sdk for the tools and platform-tools (1,2) and whatever API level
-  # Android list sdk number 9 = 2.3.3 (API level 10)
-  # Assume number 4 = 4.2.2 (API level 17) is already installed
-  - android update sdk --filter 1,2,9 --no-ui --force
+
+    # Install the latest base Android SDK and extract
+    - 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; 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 Android components.
+    # Only update the sdk for the tools and platform-tools and whatever API level
+    - android update sdk --filter platform-tools,android-16,extra-android-support,$ANDROID_SDKS --no-ui --force
+
+    # Create and start emulator
+    - echo no | android create avd --force -n Mint -t $ANDROID_TARGET --abi $ANDROID_ABI
+    - emulator -avd Mint -no-skin -no-audio -no-window &
 
 before_script:
-  - ls -la
-  - ls -la android-sdk-linux
-  - ls -la android-sdk-linux/tools
-  - ls -la android-sdk-linux/platform-tools
+
+    - ls -la
+    - ls -la android-sdk-linux
+    - ls -la android-sdk-linux/tools
+    - ls -la android-sdk-linux/platform-tools
+    # Make sure the emulator has started before running
+    - ./wait_for_emulator
+
+script:
+    - mvn install -Pintegration-tests -Dandroid.device=Mint