-
Notifications
You must be signed in to change notification settings - Fork 143
/
.travis.yml
43 lines (37 loc) · 1.62 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
language: android
jdk: oraclejdk8
sudo: true
os:
- linux
addons:
apt_packages:
- pandoc
before_cache:
# Do not cache a few Gradle files/directories (see https://docs.travis-ci.com/user/languages/java/#Caching)
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
cache:
directories:
# Gradle dependencies
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/
# Android build cache (see https://developer.android.com/studio/build/build-cache.html)
- $HOME/.android/build-cache
before_script:
- mkdir -p $ANDROID_HOME/licenses
- echo "8933bad161af4178b1185d1a37fbf41ea5269c55" > $ANDROID_HOME/licenses/android-sdk-license
- echo "d56f5187479451eabf01fb78af6dfcb131a6481e" >> $ANDROID_HOME/licenses/android-sdk-license
- mkdir -p $HOME/.android # silence sdkmanager warning
- echo 'count=0' > $HOME/.android/repositories.cfg # silence sdkmanager warning
- echo y | $ANDROID_HOME/tools/bin/sdkmanager 'tools' 'platform-tools' 'build-tools;28.0.2' > /dev/null
- echo y | $ANDROID_HOME/tools/bin/sdkmanager 'platforms;android-27' > /dev/null
script:
- set -o pipefail
- ./gradlew clean assemble :library:check --profile --continue 2>&1 | tee build.log
- set +o pipefail
- |
if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
./gradlew violationCommentsToGitHub -DGITHUB_PULLREQUESTID=$TRAVIS_PULL_REQUEST -DGITHUB_OAUTH2TOKEN=$GITHUB_OAUTH2TOKEN --info
fi
- pandoc `ls -1rt build/reports/profile/profile-*.html | tail -n1` -t plain
- ./gradlew dependencyUpdate # Must run separately due to issues with the support library resolutionStrategy