forked from FHellmann/Uniatron
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
79 lines (66 loc) · 2.67 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
language: android
# https://docs.travis-ci.com/user/reference/overview/#Virtualisation-Environment-vs-Operating-System
sudo: required
dist: trusty
jdk:
- oraclejdk8
env:
global:
- ANDROID_API_LEVEL=28
- ANDROID_BUILD_TOOLS_VERSION=28.0.0
- ANDROID_EMU_API_LEVEL=19
- ANDROID_ABI=armeabi-v7a
- ADB_INSTALL_TIMEOUT=8
- GRADLE_OPTS="-Xmx2048m -XX:MaxPermSize=1024m"
android:
components:
# Uncomment the lines below if you want to
# use the latest revision of Android SDK Tools
- tools
- tools # see https://github.com/travis-ci/travis-ci/issues/6040#issuecomment-219367943)
- platform-tools
# The BuildTools version used by your project
- build-tools-$ANDROID_BUILD_TOOLS_VERSION
# The SDK version used to compile your project
- android-$ANDROID_API_LEVEL
- android-$ANDROID_EMU_API_LEVEL
notifications:
email: false
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
cache:
directories:
- $HOME/.m2
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/
- $HOME/.android/build-cache
# Emulator Management: Create, Start and Wait
before_script:
- chmod +x gradlew
# Install SDK license so Android Gradle plugin can install deps.
- mkdir "$ANDROID_HOME/licenses" || true
- echo "d56f5187479451eabf01fb78af6dfcb131a6481e" > "$ANDROID_HOME/licenses/android-sdk-license"
# Install the rest of tools (e.g., avdmanager).
- sdkmanager tools
# Install the system image.
- sdkmanager "system-images;android-$ANDROID_EMU_API_LEVEL;default;$ANDROID_ABI"
- android-update-sdk --components=sys-img-$ABI-$API --accept-licenses='android-sdk-license-[0-9a-f]{8}'
# Create and start emulator for the script. Meant to race the install task.
- echo no | avdmanager create avd --force -n test -k "system-images;android-$ANDROID_EMU_API_LEVEL;default;$ANDROID_ABI"
- $ANDROID_HOME/emulator/emulator -avd test -no-audio -no-window &
- android-wait-for-emulator
- adb shell input keyevent 82 &
script:
- ./gradlew clean build jacocoRootReport -PdisablePreDex --stacktrace
after_success:
- bash <(curl -s https://codecov.io/bash)
after_failure:
- "cat $TRAVIS_BUILD_DIR/app/build/reports/checkstyle/main.xml"
- "cat $TRAVIS_BUILD_DIR/app/build/reports/findbugs/debug.xml"
- "cat $TRAVIS_BUILD_DIR/app/build/reports/pmd/main.xml"
- "cat $TRAVIS_BUILD_DIR/app/build/reports/lint-results.xml"
- "cat $TRAVIS_BUILD_DIR/domain/build/reports/checkstyle/main.xml"
- "cat $TRAVIS_BUILD_DIR/domain/build/reports/findbugs/debug.xml"
- "cat $TRAVIS_BUILD_DIR/domain/build/reports/pmd/main.xml"
- "cat $TRAVIS_BUILD_DIR/domain/build/reports/lint-results.xml"