aboutsummaryrefslogtreecommitdiffstats
path: root/.travis.yml
blob: 1ce4475cdb28dfd53381f62ba2bd9e4f21ff0f30 (plain)
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
language: android
jdk: openjdk7
# env:
    # global:
        # - ANDROID_API_LEVEL=21
          # - ANDROID_ABI=armeabi-v7a
          # - ADB_INSTALL_TIMEOUT=8 # minutes (2 minutes by default)

# force non-container build
sudo: required
# OpenJDK 6 and OpenJDK 7 processes will encounter buffer overflows when the host name is too long.
# hostname addon disabled due to https://github.com/travis-ci/travis-ci/issues/5669
# https://docs.travis-ci.com/user/hostname
#addons:
#    hostname: short-hostname
# workaround from https://github.com/travis-ci/travis-ci/issues/5227#issuecomment-165131913
before_install:
    - cat /etc/hosts # optionally check the content *before*
    - sudo hostname "$(hostname | cut -c1-63)"
    - sed -e "s/^\\(127\\.0\\.0\\.1.*\\)/\\1 $(hostname | cut -c1-63)/" /etc/hosts | sudo tee /etc/hosts
    - cat /etc/hosts # optionally check the content *after*
android:
    components:
        - tools
        - build-tools-23.0.2
        - build-tools-23.0.1
        - android-23
        - android-22
        - android-21
        - android-19
        - platform-tools
        - extra-android-support
        - extra-android-m2repository
    licenses:
        - 'android-sdk-preview-license-52d11cd2'
        - 'android-sdk-license-.+'
        - 'google-gdk-license-.+'

# doesn't work, travis is just too slow
# before_script:
# - echo no | android create avd --force -n test -t android-$ANDROID_API_LEVEL --abi $ANDROID_ABI
# - emulator -avd test -no-skin -no-audio -no-window &
# - ./tools/android-wait-for-emulator
# - adb shell input keyevent 82 &

script:
    # - ./gradlew connectedAndroidTest
    - ./gradlew --stacktrace testDebug jacocoTestReport coveralls