-
Notifications
You must be signed in to change notification settings - Fork 103
/
.travis.yml
38 lines (30 loc) · 1.75 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
language: java
dist: trusty
jdk: oraclejdk8
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:
# Android SDK
- $HOME/android-cmdline-tools
- $HOME/android-sdk
# Gradle dependencies
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/
# Android build cache (see http://tools.android.com/tech-docs/build-cache)
- $HOME/.android/build-cache
install:
# Download and unzip the Android command line tools (if not already there thanks to the cache mechanism)
# Latest version of this file available here: https://developer.android.com/studio/#command-tools
- if test ! -e $HOME/android-cmdline-tools/cmdline-tools.zip ; then curl https://dl.google.com/android/repository/commandlinetools-linux-6609375_latest.zip > $HOME/android-cmdline-tools/cmdline-tools.zip ; fi
- unzip -qq -n $HOME/android-cmdline-tools/cmdline-tools.zip -d $HOME/android-cmdline-tools
# Install or update Android SDK components (will not do anything if already up to date thanks to the cache mechanism)
- echo y | $HOME/android-cmdline-tools/tools/bin/sdkmanager --sdk_root=$HOME/android-sdk 'platform-tools' > /dev/null
# Latest version of build-tools available here: https://developer.android.com/studio/releases/build-tools.html
- echo y | $HOME/android-cmdline-tools/tools/bin/sdkmanager --sdk_root=$HOME/android-sdk 'build-tools;30.0.3' > /dev/null
- echo y | $HOME/android-cmdline-tools/tools/bin/sdkmanager --sdk_root=$HOME/android-sdk 'platforms;android-30' > /dev/null
env:
- ANDROID_HOME=$HOME/android-sdk
script: ./gradlew --no-daemon --parallel build