-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
69 lines (56 loc) · 2.26 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
language: android
env:
global:
- ADB_INSTALL_TIMEOUT=8 # minutes (2 minutes by default)
android:
components:
# Use the latest revision of Android SDK Tools
- platform-tools
- tools
# The BuildTools version used to build the project
- build-tools-23.0.3
# The SDK version used to compile the project
- android-23
# Additional components
- extra-android-support
- extra-google-google_play_services
- extra-google-m2repository
- extra-android-m2repository
- addon-google_apis-google-23
# System image used to run emulator for tests
# - sys-img-armeabi-v7a-addon-google_apis-google-23
# before_script:
# # Emulator Management: Create, Start and Wait
# - echo no | android create avd --force --name test --target "Google Inc.:Google APIs:23" --abi "google_apis/armeabi-v7a"
# - emulator -avd test -no-skin -no-audio -no-window &
# - android-wait-for-emulator
# - adb shell input keyevent 82 &
before_install:
- if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then
openssl aes-256-cbc -K $encrypted_6a2ee1f3b7a8_key -iv $encrypted_6a2ee1f3b7a8_iv -in secrets.tar.enc -out secrets.tar -d;
tar xvf secrets.tar;
fi
script:
- NBUSY_VERSION_NAME=${TRAVIS_TAG} ./gradlew build check # connectedCheck to enable emulator testing
- if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then
NBUSY_VERSION_NAME=${TRAVIS_TAG} ./gradlew assembleRelease -Pandroid.injected.signing.store.file=nbusy.keystore -Pandroid.injected.signing.store.password=$NBUSY_KEYSTORE_PASS -Pandroid.injected.signing.key.alias=nbusy -Pandroid.injected.signing.key.password=$NBUSY_KEYSTORE_PASS;
fi
after_success:
- if [ -n "${TRAVIS_TAG}" ] && [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then
NBUSY_VERSION_NAME=${TRAVIS_TAG} ./gradlew publishApkRelease;
fi
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
cache:
directories:
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/
deploy:
provider: releases
api_key:
secure: Uki/teY8Vg7ePG15/QGHdF3GondqBOLZTv5m52RkYxmi0cns2K/M9O0P6PW3nPk8uUWtQZOGv8wlDFC/HwMv60pgcPqnxgVjzrT2497Rmj9vQ6BWFHonXRFepYiAQXxlpAeUv6bltnYU1f1JiEKk4UcQzJ6gX5ZrAb+jhtxwVPo=
file: app/build/outputs/apk/app-release.apk
skip_cleanup: true
on:
repo: nbusy/nbusy-android
tags: true