-
Notifications
You must be signed in to change notification settings - Fork 93
/
.travis.yml
59 lines (48 loc) · 2.03 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
54
55
56
57
58
59
language: android
sudo: required
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/
env:
global:
- COMPILE_SDK_VERSION=29 # Same as `compileSdkVersion` in build.gradle
- EMULATOR_API=22
- BUILD_TOOLS_VERSION=28.0.3 # Same as `buildToolsVersion` in build.gradle
- ABI=armeabi-v7a # ARM ABI v7a by default
- ADB_INSTALL_TIMEOUT=5 # minutes
android:
components:
- tools # Update android-sdk (also called android-sdk-tools)
- platform-tools
- tools # Write the second time to update to the newest as described in the document
- build-tools-${BUILD_TOOLS_VERSION} # For building
- android-${COMPILE_SDK_VERSION} # For building
- android-${EMULATOR_API} # For testing
- extra-android-m2repository # Support library
- sys-img-${ABI}-android-${EMULATOR_API} # Emulator image
notifications:
email: false
before_install:
- chmod +x gradlew
#- yes | sdkmanager "platforms;android-27" # Workaround from https://github.com/travis-ci/travis-ci/issues/8879
install:
- sdkmanager --list || true
- echo yes | sdkmanager "extras;m2repository;com;android;support;constraint;constraint-layout;1.0.2" #&> /dev/null
- echo yes | sdkmanager "extras;m2repository;com;android;support;constraint;constraint-layout-solver;1.0.2" #&> /dev/null
- avdmanager --list || true # See below "avdmanager"
before_script:
# - echo no | avdmanager create avd -n test -k android-${EMULATOR_API} -f --abi ${ABI} --tag "$TAG"
- echo no | android create avd --force -n test -t android-${EMULATOR_API} --abi ${ABI} # avdmanager is not available (?) (see https://github.com/travis-ci/packer-templates/issues/482 )
- emulator -avd test -no-audio -no-window &
- android-wait-for-emulator
- adb shell input keyevent 82 &
script:
- ./gradlew assembleRelease
- ./gradlew jacocoTestReport
- ./gradlew connectedCheck
after_success:
- bash <(curl -s https://codecov.io/bash)