forked from pazaan/600SeriesAndroidUploader
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
83 lines (73 loc) · 2.35 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
language: android
dist: trusty
jdk: oraclejdk8
sudo: required
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"
env:
global:
- EMULATOR_API_LEVEL=16
- ANDROID_API_LEVEL=29
- ANDROID_BUILD_TOOLS_VERSION=29.0.2
- ANDROID_ABI=armeabi-v7a
- ADB_INSTALL_TIMEOUT=8
android:
components:
- tools
- platform-tools
- tools
- build-tools-$ANDROID_BUILD_TOOLS_VERSION
- android-$EMULATOR_API_LEVEL
- android-$ANDROID_API_LEVEL
- extra-android-support
- extra-android-m2repository
- sys-img-$ANDROID_ABI-android-$ANDROID_API_LEVEL
- sys-img-$ANDROID_ABI-android-$EMULATOR_API_LEVEL
licenses:
- android-sdk-.+
- google-gdk-.+
before_install:
- openssl aes-256-cbc -K $encrypted_c75769befc95_key -iv $encrypted_c75769befc95_iv
-in keystore.jks.enc -out keystore.jks -d
- gpg --quiet --batch --yes --decrypt --passphrase="$GPG_ENCRYPTION_KEY" --output
app/google-services.json app/google-services.json.gpg
- chmod +x gradlew
- touch $HOME/.android/repositories.cfg
- yes | sdkmanager "extras;m2repository;com;android;support;constraint;constraint-layout-solver;1.0.2"
- yes | sdkmanager "platforms;android-29"
- yes | sdkmanager "platforms;android-16"
- yes | sdkmanager "build-tools;29.0.2"
- yes | sdkmanager "system-images;android-15;google_apis;armeabi-v7a"
- sdkmanager --list
- yes | sdkmanager --update
before_script:
- android list targets
- echo no | android create avd --force -n test -t android-16 --abi armeabi-v7a -c 100M
- emulator -avd test -no-window &
- android-wait-for-emulator
- adb shell input keyevent 82 &
script:
- "./gradlew clean build connectedCheck -PdisablePreDex --stacktrace"
before_deploy:
- mv app/build/outputs/apk/release/app-release.apk app/build/outputs/apk/release/600-series-ns-uploader.apk
deploy:
edge: true # opt into dpl v2
provider: releases
prerelease: true
file: app/build/outputs/apk/release/600-series-ns-uploader.apk
on:
repo: pazaan/600SeriesAndroidUploader
tags: true
notifications:
webhooks:
urls:
- https://webhooks.gitter.im/e/0283e844d525908106b2
on_success: change
on_failure: always
on_start: false