-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy path.travis.yml
65 lines (55 loc) · 1.93 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
language: android
# Configure Travis CI to set the following environment variables for your builds:
# - WS_USE_PRODUCTION
# - WS_PROD_KEYSTORE_PASSWORD
# - WS_PROD_KEYSTORE_KEY_ALIAS
# - WS_PROD_KEYSTORE_KEY_PASSWORD
# - GITHUB_OAUTH_TOKEN (for pushing release APKs)
android:
components:
# Specify the components that are needed to build the project.
# 'tools' is listed twice on purpose (to get the newest version).
- tools
- platform-tools
- tools
# Build tools & SDK.
- build-tools-30.0.2
- android-30
# Additional components
- extra-google-m2repository
- extra-android-m2repository
before_install:
- yes | sdkmanager "platforms;android-30"
before_script:
# Decrypts the keystore (if this is not a PR build).
# The remaining keystore environment variables are configured to be directly
# set by Travis CI.
- 'if [ ${TRAVIS_SECURE_ENV_VARS} = "true" ] && [ -n "$encrypted_31175506456e_key" ]; then
openssl aes-256-cbc -d
-K $encrypted_31175506456e_key -iv $encrypted_31175506456e_iv
-in keystores/warmshowers.jks.enc -out "$HOME/warmshowers.jks" &&
export WS_PROD_KEYSTORE_FILE="$HOME/warmshowers.jks";
fi'
before_cache:
# Cleans up the cache.
- rm -f "$HOME/.gradle/caches/modules-2/modules-2.lock"
- rm -fR "$HOME/.gradle/caches/*/plugin-resolution/"
- rm -f "$HOME/warmshowers.jks"
cache:
directories:
- "$HOME/.android/build-cache"
- "$HOME/.gradle/caches/"
- "$HOME/.gradle/wrapper/"
before_deploy:
- mv app/build/outputs/apk/release/app-release.apk wsandroid-${TRAVIS_TAG}-floss.apk
- mv app/build/outputs/mapping/release/mapping.txt wsandroid-${TRAVIS_TAG}-floss-mapping.txt
deploy:
# Deploys the release APK for tagged revisions to GitHub.
provider: releases
api_key: "$GITHUB_OAUTH_TOKEN"
file:
- "wsandroid-${TRAVIS_TAG}-floss.apk"
- "wsandroid-${TRAVIS_TAG}-floss-mapping.txt"
skip_cleanup: true
on:
tags: true