-
Notifications
You must be signed in to change notification settings - Fork 2
/
.travis.yml
50 lines (42 loc) · 1.22 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
language: android
dist: trusty
jdk:
- oraclejdk8
addons:
apt:
update: true
env:
global:
- ANDROID_COMPILE_SDK=29
- ANDROID_BUILD_TOOLS=29.0.3
- GOOGLE_PUBLISH_JSON=app/misc/android-publisher-account.json
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
cache:
directories:
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/
- $HOME/.android/build-cache
before_install:
- sudo apt-get install -y gnupg2
- gpg --batch --decrypt --output ${GOOGLE_PUBLISH_JSON} --passphrase ${GOOGLE_ACCOUNT_DECRYPTION_KEY} ${GOOGLE_PUBLISH_JSON}.gpg
- yes | sdkmanager "platforms;android-${ANDROID_COMPILE_SDK}"
- yes | sdkmanager "platform-tools"
- yes | sdkmanager "build-tools;${ANDROID_BUILD_TOOLS}"
- yes | sdkmanager "extras;android;m2repository"
- yes | sdkmanager "extras;google;m2repository"
script:
- "./gradlew --info assembleRelease"
deploy:
- provider: releases
api_key: "${GITHUB_PUBLISH_OAUTH_TOKEN}"
file: app/build/outputs/apk/release/app-release.apk
skip_cleanup: true
on:
tags: true
- provider: script
script: ./gradlew app:publishApkRelease
skip_cleanup: true
on:
tags: true