Skip to content

Commit a17f0db

Browse files
authored
chore: fix travis.yml to support recent api levels (#375)
1 parent 25f472b commit a17f0db

File tree

1 file changed

+31
-30
lines changed

1 file changed

+31
-30
lines changed

.travis.yml

Lines changed: 31 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,48 @@
11
language: android
22
# you MUST mention trusty https://docs.travis-ci.com/user/languages/android/
33
dist: trusty
4+
jdk: oraclejdk8
5+
46
env:
5-
global:
6-
# These parameters should match the parameters for build tools and sdk versions in the gradle file
7-
- ANDROID_BUILD_TOOLS=29.0.3 # should match gradle
8-
- ADB_INSTALL_TIMEOUT=5 # minutes
9-
- ANDROID_API=29 # api is same as gradle file
10-
matrix:
11-
- EMULATOR_API=19
12-
- EMULATOR_API=21
13-
- EMULATOR_API=22
7+
global:
8+
- ANDROID_API=29 # api is same as gradle file
9+
- ANDROID_BUILD_TOOLS=29.0.3 # should match gradle
10+
- ADB_INSTALL_TIMEOUT=5 # minutes
11+
matrix:
12+
# API 26+ supports "x86" (ANDROID_ABI=x86) emulators only, which are not supported yet in travis VMs
13+
# so API 24 is the highest level we can run with emulator for now
14+
- EMULATOR_API=19 ANDROID_TAG=google_apis ANDROID_ABI=armeabi-v7a # API-16 build fails in travis
15+
- EMULATOR_API=21 ANDROID_TAG=google_apis ANDROID_ABI=armeabi-v7a
16+
- EMULATOR_API=24 ANDROID_TAG=google_apis ANDROID_ABI=armeabi-v7a
17+
1418
android:
1519
components:
1620
- tools
17-
- platform-tools-$ANDROID_BUILD_TOOLS
21+
- platform-tools
1822
- build-tools-$ANDROID_BUILD_TOOLS
1923
- android-$ANDROID_API
2024
- android-$EMULATOR_API
25+
# Google APIs
26+
- addon-google_apis-google-$ANDROID_API
27+
- addon-google_apis-google-$EMULATOR_API
28+
# Google Play Services
29+
- extra-google-google_play_services
30+
# Support library
31+
- extra-android-support
32+
# Latest artifacts in local repository
2133
- extra-google-m2repository
22-
- extra-android-m2repository # for design library
23-
- addon-google_apis-google-19 # google play services
24-
- sys-img-armeabi-v7a-addon-google_apis-google-$ANDROID_API
25-
- sys-img-armeabi-v7a-addon-google_apis-google-$EMULATOR_API
26-
- sys-img-armeabi-v7a-android-$EMULATOR_API
27-
licenses:
28-
- android-sdk-preview-license-.+
29-
- android-sdk-license-.+
30-
- google-gdk-license-.+
31-
jdk:
32-
- oraclejdk8
33-
before_cache:
34-
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
35-
cache:
36-
directories:
37-
- $HOME/.gradle/caches/
38-
- $HOME/.gradle/wrapper/
34+
- extra-android-m2repository
35+
# Emulators
36+
- sys-img-$ANDROID_ABI-android-$EMULATOR_API
37+
3938
before_install:
40-
#- yes | sdkmanager "platforms;android-$ANDROID_API"
39+
#- touch $HOME/.android/repositories.cfg
40+
4141
before_script:
4242
- echo $TRAVIS_BRANCH
4343
- echo $TRAVIS_TAG
44-
- echo no | android create avd --force -n test -t android-$EMULATOR_API --abi armeabi-v7a
45-
- emulator -avd test -no-audio -no-window &
44+
- echo no | android create avd --force -n test -t android-$EMULATOR_API --abi $ANDROID_ABI
45+
- emulator -avd test -no-window &
4646
- scripts/android-wait-for-emulator.sh
4747
- adb shell input keyevent 82 &
4848
script:
@@ -102,3 +102,4 @@ jobs:
102102
- ./gradlew ship
103103
after_script: skip
104104
after_success: skip
105+

0 commit comments

Comments
 (0)