-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.travis.yml
More file actions
56 lines (48 loc) · 2.31 KB
/
.travis.yml
File metadata and controls
56 lines (48 loc) · 2.31 KB
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
language: android
dist: trusty
sudo: false
# Taken from https://travis-ci.org/ankidroid/Anki-Android/builds/516486599/config
env:
global:
- ADB_INSTALL_TIMEOUT=8
- ABI=armeabi-v7a
- GRADLE_TOOLS=29.0.0
- GRADLE_ANDROID=29
- EMU_ANDROID=22
- EMU_FLAVOR=default # use google_apis flavor if no default flavor emulator
# PATH order is incredibly important. e.g. the 'emulator' script exists in more than one place!
- ANDROID_HOME=/usr/local/android-sdk
- TOOLS=${ANDROID_HOME}/tools
- PATH=${ANDROID_HOME}:${ANDROID_HOME}/emulator:${TOOLS}:${TOOLS}/bin:${ANDROID_HOME}/platform-tools:${PATH}
android:
components:
# installing tools to start, then use `sdkmanager` below to get the rest
- tools
licenses:
- 'android-sdk-preview-license-.+'
- 'android-sdk-license-.+'
- 'google-gdk-license-.+'
before_install:
- chmod +x gradlew
install:
- echo 'count=0' > /home/travis/.android/repositories.cfg # Avoid harmless sdkmanager warning
- echo y | sdkmanager "platform-tools" >/dev/null
- echo y | sdkmanager "tools" >/dev/null # A second time per Travis docs, gets latest versions
- echo y | sdkmanager "build-tools;"$GRADLE_TOOLS >/dev/null # Implicit gradle dependency - gradle drives changes
# - echo y | sdkmanager "platforms;android-"$EMU_ANDROID >/dev/null # We need the API of the emulator we will run
- echo y | sdkmanager "platforms;android-"$GRADLE_ANDROID >/dev/null # We need the API of the current compileSdkVersion from gradle.properties
# - echo y | sdkmanager --channel=4 "emulator" # Experiment with canary, specifying 28.0.3 (prior version) did not work
# - echo y | sdkmanager "extras;android;m2repository" >/dev/null
# - echo y | sdkmanager "system-images;android-$GRADLE_ANDROID;$EMU_FLAVOR;x86_64" #>/dev/null # install our emulator
# - echo no | avdmanager create avd --force -n test -k "system-images;android-$GRADLE_ANDROID;$EMU_FLAVOR;x86_64" -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 clean build check
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
cache:
directories:
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/