-
Notifications
You must be signed in to change notification settings - Fork 102
/
.travis.yml
50 lines (42 loc) · 1.49 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: android
dist: trusty
android:
components:
- tools # tools needs to be upgraded twice
- tools # https://github.com/travis-ci/travis-ci/issues/6040#issuecomment-219367943
- tools
- platform-tools
- build-tools-28.0.3
- android-24 # Need older API for Android ARM as no KVM for x86
- android-28
- sys-img-x86-android-26
- sys-img-armeabi-v7a-android-24
licenses:
- 'android-sdk-preview-license-52d11cd2'
- 'android-sdk-license-.+'
# From Travis CI's guide on how to improve Gradle caching
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
cache:
directories:
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/
- $HOME/.android/build-cache
# Start emulator early so it's ready when the build is done
before_install:
# Install the rest of tools (e.g. avdmanager)
- yes | sdkmanager tools
- echo no | avdmanager create avd --force --name test --package 'system-images;android-24;default;armeabi-v7a' --abi armeabi-v7a --sdcard 100M
- $ANDROID_HOME/emulator/emulator -avd test -no-audio -no-window &
before_script:
- android-wait-for-emulator
# Disable animations
- adb shell settings put global window_animation_scale 0 &
- adb shell settings put global transition_animation_scale 0 &
- adb shell settings put global animator_duration_scale 0 &
- adb shell input keyevent 82 &
script:
- ./gradlew build
- ./gradlew test
- ./gradlew connectedCheck