language: java
archive: true
jdk:
    - oraclejdk7
before_install:
    - shippable_retry sudo apt-get update
    - shippable_retry sudo apt-get install -u lib32stdc++6 lib32z1
    - shippable_retry wget http://dl.google.com/android/android-sdk_r23.0.2-linux.tgz
    - tar -xvzf android-sdk_r23.0.2-linux.tgz -C ${HOME}
    - export ANDROID_HOME=${HOME}/android-sdk-linux
    - export PATH=${PATH}:${ANDROID_HOME}/tools:${ANDROID_HOME}/platform-tools
    - android list sdk --all
    - echo yes | shippable_retry android update sdk -u -a -t 8,29,115 --force
install:
    - chmod +x gradlew
    - ./gradlew clean
before_script:
    - mkdir -p shippable/testresults
script:
    - ./gradlew check
    - ./gradlew test
    - ./gradlew cobertura
after_success:
    - ./gradlew assembleDebug assembleRelease
    - cp -r build/outputs/apk/* shippable/buildoutput
after_script:
    - cp -r build/reports/androidTests/* shippable/testresults/