This repository has been archived by the owner on Jun 27, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
86 lines (75 loc) · 2.45 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
80
81
82
83
84
85
86
# Basic runner configuration
os: linux
language: android
sudo: false # Required for the new container-based infrastructure setup
branches:
except:
- release
# Setup environment variables
env:
global:
- PLATFORM_TOOLS=27.0.1
- BUILD_TOOLS=27.0.3
- COMPILE_SDK=27
# - ADB_INSTALL_TIMEOUT=15 # Wait up to 15 minutes for adb to connect to the emulator
# Enable only JDK 8, source does not build with JDK 7
addons:
apt:
packages:
- oracle-java8-installer
jdk: oraclejdk8
# ************************************************* #
# #
# Don't forget to check versions in '/build.gradle' #
# #
# ************************************************* #
# Pre-configuration step (accept all licenses manually)
install:
- echo y | android update sdk -u -a -t tools
- echo y | android update sdk -u -a -t platform-tools
- echo y | android update sdk -u -a -t build-tools-${BUILD_TOOLS}
- echo y | android update sdk -u -a -t android-${COMPILE_SDK}
- echo y | android update sdk -u -a -t extra-google-m2repository
- echo y | android update sdk -u -a -t extra-android-m2repository
- echo y | android update sdk -u -a -t extra-google-android-support
# - echo y | android update sdk -u -a -t addon-google_apis-google-${COMPILE_SDK}
# Configure Android
android:
# Auto-accept these licenses
licenses:
- 'android-sdk-preview-license-.+'
- 'android-sdk-license-.+'
- 'google-gdk-license-.+'
- '.+'
# Build script config
components:
- tools # Workaround part 1: Get the new `repository-*.xml`
- tools # Workaround part 1: Install latest Android SDK tools
- build-tools-${BUILD_TOOLS}
- platform-tools
# Compile SDK
- android-${COMPILE_SDK}
# Additional components
- extra-google-m2repository
- extra-android-m2repository
- extra-google-android-support
# Use Gradle's cache (unlock on start)
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -rf $HOME/.gradle/caches/*/plugin-resolution/
cache:
apt: true
directories:
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/
- $HOME/.android/build-cache
# Execute the script
script:
- ./gradlew clean
- ./gradlew build
- ./gradlew assemble
# - ./gradlew demo:check
# - ./gradlew build jacocoTestReport
# Start CodeCov bash script when done with everything
# after_success:
# - bash <(curl -s https://codecov.io/bash)