forked from Gh0u1L5/WechatSpellbook
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.travis.yml
52 lines (45 loc) · 1.49 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
language: android
jdk: oraclejdk8
sudo: required
env:
global:
- ADB_INSTALL_TIMEOUT=20 # minutes (2 minutes by default)
- GRADLE_VERSION=4.4
- BUILD_API=android-27
- BUILD_TOOLS=build-tools-27.0.3
matrix:
- EMULATOR_API=android-24 EMULATOR_ABI=armeabi-v7a
android:
components:
- tools
- platform-tools
# The SDK version used to compile your project
- $BUILD_API
# The BuildTools version used by your project
- $BUILD_TOOLS
# The SDK version used to perform unit tests
- $EMULATOR_API
- sys-img-${EMULATOR_ABI}-${EMULATOR_API}
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -rf $HOME/.gradle/caches/*/plugin-resolution/
cache:
directories:
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/
- $HOME/.android/build-cache
before_install:
# Setup the correct gradle version.
- wget http://services.gradle.org/distributions/gradle-${GRADLE_VERSION}-bin.zip
- unzip gradle-${GRADLE_VERSION}-bin.zip
- export GRADLE_HOME=$PWD/gradle-${GRADLE_VERSION}
- export PATH=$GRADLE_HOME/bin:$PATH
before_script:
# Create emulator for the script. Meant to race the install task.
- echo no | android create avd --force -n test -t $EMULATOR_API --abi $EMULATOR_ABI
# Start emulator with 3GB memory and 1GB system partition.
- emulator -avd test -no-window -memory 3072 -partition-size 1024 &
# Wait for the emulator to boot.
- android-wait-for-emulator
script:
- travis_wait 60 gradle build connectedCheck