forked from MichaelRocks/libphonenumber-android
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
53 lines (46 loc) · 1.65 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
51
52
53
language: android
dist: trusty
jdk:
- oraclejdk8
env:
global:
- ADB_INSTALL_TIMEOUT=8
- ANDROID_ABI=x86_64
# Use google_apis flavor if no default flavor emulator.
- EMULATOR_FLAVOR=default
# PATH order is incredibly important. e.g. the 'emulator' script exists in more than one place!
- ANDROID_HOME=/usr/local/android-sdk
- ANDROID_TOOLS=${ANDROID_HOME}/tools
- PATH=${ANDROID_HOME}:${ANDROID_HOME}/emulator:${ANDROID_TOOLS}:${ANDROID_TOOLS}/bin:${ANDROID_HOME}/platform-tools:${PATH}
matrix:
- ANDROID_API=21
android:
components:
- tools
- tools
- platform-tools
- build-tools-30.0.3
- android-30
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
cache:
directories:
- $HOME/.m2
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/
install:
# Mute sdkmanager warning.
- echo 'count=0' > /home/travis/.android/repositories.cfg
# We need the API of the emulator we will run.
- echo y | sdkmanager "tools" >/dev/null
- echo y | sdkmanager "platform-tools" >/dev/null
- echo y | sdkmanager "platforms;android-$ANDROID_API" >/dev/null
- echo y | sdkmanager "emulator" >/dev/null
- echo y | sdkmanager "system-images;android-$ANDROID_API;$EMULATOR_FLAVOR;$ANDROID_ABI" >/dev/null
- echo no | avdmanager create avd --force -n test -k "system-images;android-$ANDROID_API;$EMULATOR_FLAVOR;$ANDROID_ABI" -c 10M
- emulator -verbose -avd test -no-accel -no-snapshot -no-window $AUDIO -camera-back none -camera-front none -selinux permissive -qemu -m 2048 &
- android-wait-for-emulator
- adb shell input keyevent 82 &
script:
- ./gradlew build
- ./gradlew connectedCheck