-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.travis.yml
93 lines (80 loc) · 2.55 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
87
88
89
90
91
92
93
language: android
sudo: false
jdk:
- oraclejdk8
env:
global:
- GRADLE_USER_HOME=$HOME/.gradle
# expected secured: $GITHUB_OAUTH_TOKEN
# http://docs.travis-ci.com/user/caching/
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
cache:
gradlew: true
gradle: true
directories:
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/
- $HOME/.android/build-cache
# ask travis-ci to download all revisions, we use revisions for version defining
git:
depth: 10000
# list of available components https://github.com/travis-ci/travis-ci/issues/2301
android:
components:
- platform-tools
- build-tools-28.0.3
- build-tools-29.0.3
- extra-android-support
- extra-android-m2repository
- extra-google-m2repository
- android-29
licenses:
- '.+'
before_install:
# make scripts executable for linux CI
- chmod +x gradlew
# version script
- chmod +x gradle/version-up.sh
install:
- true
script:
- gradle/version-up.sh
- ./gradlew assembleDebug --console=plain
# resolve wildcard to real name before deploy
# http://stackoverflow.com/questions/25929225/how-to-deploy-to-github-with-file-pattern-on-travis
before_deploy:
- export LIB_FILE1=$(ls autoproxy-annotations/build/libs/autoproxy-*.jar)
- export LIB_FILE2=$(ls autoproxy-generators/build/libs/autoproxy-*.jar)
- export LIB_FILE3=$(ls autoproxy-processor/build/libs/autoproxy-*.jar)
- export LIB_FILE4=$(ls autoproxy-rx-annotations/build/libs/autoproxy-*.jar)
- export LIB_FILE5=$(ls autoproxy-rx-generators/build/libs/autoproxy-*.jar)
- export LIB_FILE6=$(ls autoproxy-rx2-generators/build/libs/autoproxy-*.jar)
- export LIB_FILE7=$(ls autoproxy-rx3-generators/build/libs/autoproxy-*.jar)
- echo "release file(s) $LIB_FILE1 $LIB_FILE2 $LIB_FILE3 $LIB_FILE4 $LIB_FILE5 $LIB_FILE6 $LIB_FILE7"
# https://github.com/Bartvds/demo-travis-gh-pages
# http://docs.travis-ci.com/user/deployment/releases/
deploy:
provider: releases
api_key: $GITHUB_OAUTH_TOKEN
file:
- "${LIB_FILE1}"
- "${LIB_FILE2}"
- "${LIB_FILE3}"
- "${LIB_FILE4}"
- "${LIB_FILE5}"
- "${LIB_FILE6}"
- "${LIB_FILE7}"
skip_cleanup: true
on:
tags: true
all_branches: true
notifications:
email: false
webhooks:
urls:
- https://webhooks.gitter.im/e/f9d875b20132dda64fbe
on_success: always # options: [always|never|change] default: always
on_failure: never # options: [always|never|change] default: always
on_start: never # options: [always|never|change] default: always