|
1 | 1 | language: android
|
2 | 2 | # you MUST mention trusty https://docs.travis-ci.com/user/languages/android/
|
3 | 3 | dist: trusty
|
| 4 | +jdk: oraclejdk8 |
| 5 | + |
4 | 6 | 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 | + |
14 | 18 | android:
|
15 | 19 | components:
|
16 | 20 | - tools
|
17 |
| - - platform-tools-$ANDROID_BUILD_TOOLS |
| 21 | + - platform-tools |
18 | 22 | - build-tools-$ANDROID_BUILD_TOOLS
|
19 | 23 | - android-$ANDROID_API
|
20 | 24 | - 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 |
21 | 33 | - 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 | + |
39 | 38 | before_install:
|
40 |
| - #- yes | sdkmanager "platforms;android-$ANDROID_API" |
| 39 | + #- touch $HOME/.android/repositories.cfg |
| 40 | + |
41 | 41 | before_script:
|
42 | 42 | - echo $TRAVIS_BRANCH
|
43 | 43 | - 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 & |
46 | 46 | - scripts/android-wait-for-emulator.sh
|
47 | 47 | - adb shell input keyevent 82 &
|
48 | 48 | script:
|
@@ -102,3 +102,4 @@ jobs:
|
102 | 102 | - ./gradlew ship
|
103 | 103 | after_script: skip
|
104 | 104 | after_success: skip
|
| 105 | + |
0 commit comments