-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
65 lines (54 loc) · 1.85 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
sudo:
- required
language:
- android
jdk:
- oraclejdk8
android:
components:
- tools # to get the new `repository-11.xml`
- tools # see https://github.com/travis-ci/travis-ci/issues/6040#issuecomment-219367943)
- platform-tools
# The BuildTools version used by this project
- build-tools-25.0.2
# The SDK version used to compile this project
- android-25
# Support library
- extra-android-support
# Latest artifacts in local repository
- extra-google-m2repository
- extra-android-m2repository
- extra-google-google_play_services
branches:
only:
- master
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/
- $HOME/.android/build-cache
before_install:
# Decrypt the keystore signing the APK
- if [[ ${TRAVIS_PULL_REQUEST} == "false" ]]; then openssl aes-256-cbc -K $encrypted_5447a36b1e2c_key -iv $encrypted_5447a36b1e2c_iv -in secretfiles.tar.enc -out secretfiles.tar -d; fi
- if [[ ${TRAVIS_PULL_REQUEST} == "false" ]]; then tar xvf secretfiles.tar; fi
# Set the executable flag on the gradle wrapper
- chmod +x gradlew
before_script:
- echo no | android create avd --force -n test -t android-21 --abi armeabi-v7a
- emulator -avd test -no-skin -no-audio -no-window &
- android-wait-for-emulator
- adb shell input keyevent 82 &
script:
# Launch the Gradle wrapper to build and run emulator tests
- ./gradlew clean build connectedCheck
after_success:
- if [[ ${TRAVIS_PULL_REQUEST} == "false" ]]; then ./gradlew publishApkRelease --stacktrace; fi
after_failure:
- "cat $TRAVIS_BUILD_DIR/app/build/outputs/lint-results-debug.xml"
addons:
code_climate:
repo_token:
- 3d4801d7d11c59a032d98f228a56ec4f6fb4191804d30f007c116500c1a5e4bf