forked from niccokunzmann/mundraub-android
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
107 lines (98 loc) · 8.97 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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# from https://docs.travis-ci.com/user/languages/android/
language: android
android:
components:
# Uncomment the lines below if you want to
# use the latest revision of Android SDK Tools
- tools
- platform-tools
# The SDK version used to compile your project
- android-25
# caching from https://stackoverflow.com/a/38772440
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/
# from https://stackoverflow.com/a/53409848
git:
depth: false
env:
global:
- TRAVIS_SDK_PATH=/usr/local/android-sdk/licenses
- secure: "Na7QEyUACs6m4mubocccHnGAyeAuEZHgnMB3OvB2Mur0kQQ68S7OUWWm16s4meEeVZnMBhUHb1tqamJDeKXTTKkPBVNA4UZhs/eFcftBBrQFAJA6HhKbdqwO+fEHJIaoa8Sa09z8QLmS9BhkB3a+/UvAkLeFsBPf5K3p6p1PKpSK7wNT6RoLN5kOWrlJoKYPexl1oXcu7zTz4/nSpr4M4WdTUoM1rM/4X1KDxeUQ0RDxwY4NP/6g+BVifXHOSKsQNpf0pkPzSIinuKr36n2BhjEQxuaHFTAamJArIcAhjt3xbY7OnCmOaaOe7UqaOPp2mR2HbcWov7GJqiyYuwWx+PCoQ1KhtPBgvFnpOlBmLhqlID+9c1gsQ8antoHApQmnhUKD2Osu+WAYk6P1mV27T6ysgpCGqHUNH20prsxovdnM6Zx2yTRwuD1UzUGl++B0i5LwCVuwq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/+hjdtUab6FpYYr1l5RI9WdDH/rgtgyCY0ujreIPXw4R4+9q65kD3YQ2MTFfkBvY2067Y0PaYSiv2ReDczIOy68dx/0ERb2WtraXrM/5KmdvEDxo8AAjG02zlMZp6Aud1UCeOl4ZRGlj6RuCRVRIeBiBeJbu+Rw61RiQhP4=" # SIGN_THE_BUILD=true
- keystore_alias=key0
addons:
apt:
# see https://docs.travis-ci.com/user/installing-dependencies/
update: true
packages:
- python3-pip
before_install:
# create signing key, see https://doubledot.dev/blog/2018-11-14-Continuous-Integration/
- if [ "$SIGN_THE_BUILD" == "true" ]; then openssl aes-256-cbc -K $TRAVIS_FILE_KEY -iv $TRAVIS_FILE_IV -in .travis/key.jks.enc -out .travis/key.jks -d; fi
# create google api service account json key file
- if [ "$SIGN_THE_BUILD" == "true" ]; then openssl aes-256-cbc -K $TRAVIS_FILE_KEY -iv $TRAVIS_FILE_IV -in .travis/api.json.enc -out .travis/api.json -d; fi
before_script:
# install sdkman from https://sdkman.io/
- curl -s "https://get.sdkman.io" | bash && source /home/travis/.sdkman/bin/sdkman-init.sh
# install gradle of a specific version, from https://gradle.org/install/#with-a-package-manager
- sdk install gradle 5.1.1
# install the licenses
# see https://developer.android.com/studio/intro/update#download-with-gradle
- mkdir -p "$TRAVIS_SDK_PATH"
- printf "d56f5187479451eabf01fb78af6dfcb131a6481e\n8933bad161af4178b1185d1a37fbf41ea5269c55\n24333f8a63b6825ea9c5514f83c2829b004d1fee\n" > "$TRAVIS_SDK_PATH/android-sdk-license"
script:
# build and test
- ./scripts/generate-changelog.py
- gradle build check
- if [ "$SIGN_THE_BUILD" == "true" ]; then gradle assembleRelease; gradle bundleRelease; fi
- ./scripts/runHTTPProxy.sh --compile
# use the build
- "find | grep '\\.apk'"
- .travis/release-apk
- .travis/debug-apk
- .travis/collect-apks
# assume that all tags are releases and release to google play
- if .travis/check-google-play; then .travis/create-google-play-release; fi
- if [ -f "apks/fruit-radar-google-play-release.apk" ]; then .travis/deploy-to-play-store beta --validate_only true --skip_upload_images true --skip_upload_screenshots true --skip_upload_apk true --skip_upload_aab true; fi
- if [ -n "$TRAVIS_TAG" ]; then DEPLOY_TRACK="`.travis/get-play-deploy-track \"$TRAVIS_TAG\"`"; echo "deploying to track \"$DEPLOY_TRACK\""; fi
deploy:
# push the latest strings to translate
- provider: script
script: .travis/deploy_translation_sources
skip_cleanup: true
on:
branch: master
# push the release tag
- provider: script
script: .travis/create_release
skip_cleanup: true
on:
branch: master
# in the release tag, upload the apks to GitHub
- provider: releases
api_key:
secure: bvhMN07c2vgCBTH62fiF+XwK/4Vs0n6kIwP3Fv+emWgu7TUtEgn8Ypx2Bft3nKYZCZJa2/nM5BBqJ4OanSAzhiLT5u8PT6tbPAJRxe98mUYR090aUReHEUesWKuwFVvhpjp0G1obY7p2YrnxjugJrrr/rgr8Rps382h3kKws9cTyWg1vYlbvmzH2Ks//7lObU3UiGit61La4VYffkcYOEYCo4UQQsrCScnHokYmf9sorimNTSFBQvuaLZpJF91T++Xa2Bl5IsbGnE0gQ3bGEltmKKbukkvGCsmKjxNj3WMIoPfjZfF1D6P9koiWXGMncex4dsdAU3nGGfeyAJpNlQMsCHMEu+Phu7qZsaLJHeo1LIFrkRnkBegNxOWjP8VW9+cMvAwuCfwkJMqPJZRcBUy3RoBRgoXha1jaLTb4LMxLO+WSd4Qf1X5zw437XSiKHRnXc+8noKbvSknTsc4MygyO84chuvbX/i9qNpVGiWRXfnnMCZlGStvY0O8Aov+19wohM1crvaTaA1fZezJjjOCXE004tjjPMUw2plJccn7OVjb/K4F7WkZclbF+yJujOaeX3oYxpgZEsPb7dgyuIB7pGq40kJ8tJLbZaDaHteHvSYpfsFsrbK4B3fCHt3FOgjeA9oj+U9vwpF27GDgvs2XYPCM20W9UpZdFJljYokNw=
file:
- apks/*
file_glob: true
skip_cleanup: true
on:
tags: true
repo: niccokunzmann/mundraub-android
# in the release tag, upload the apks to Google Play
- provider: script
script: .travis/deploy-to-play-store "$DEPLOY_TRACK"
skip_cleanup: true
on:
tags: true
repo: niccokunzmann/mundraub-android