-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy path.travis.yml
77 lines (65 loc) · 3.4 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
dist: trusty
language: android
jdk: oraclejdk8
notifications:
email: true
env:
global:
# install timeout in minutes (2 minutes by default)
- ADB_INSTALL_TIMEOUT=8
- ABI=x86_64
- EMU_FLAVOR=default # use google_apis flavor if no default flavor emulator
# PATH order is incredibly important. e.g. the 'emulator' script exists in more than one place!
- ANDROID_HOME=/usr/local/android-sdk
- TOOLS=${ANDROID_HOME}/tools
- PATH=${ANDROID_HOME}:${ANDROID_HOME}/emulator:${TOOLS}:${TOOLS}/bin:${ANDROID_HOME}/platform-tools:${PATH}
matrix:
- API=25
android:
components:
# installing tools to start, then use `sdkmanager` below to get the rest
- tools
licenses:
- 'android-sdk-preview-license-.+'
- 'android-sdk-license-.+'
- 'google-gdk-license-.+'
before_install:
# decrypt the signing key
- openssl aes-256-cbc -K $encrypted_7915ebf78935_key -iv $encrypted_7915ebf78935_iv -in keystoreAdbClipboard.enc -out keystoreAdbClipboard -d
# Emulator Management: Create, Start and Wait
install:
- echo 'count=0' > /home/travis/.android/repositories.cfg # Avoid harmless sdkmanager warning
- echo y | sdkmanager "platform-tools" >/dev/null
- echo y | sdkmanager "tools" >/dev/null # A second time per Travis docs, gets latest versions
- echo y | sdkmanager "build-tools;28.0.3" >/dev/null # Implicit gradle dependency - gradle drives changes
- echo y | sdkmanager "platforms;android-$API" >/dev/null # We need the API of the emulator we will run
- echo y | sdkmanager "platforms;android-28" >/dev/null # We need the API of the current compileSdkVersion from gradle.properties
- echo y | sdkmanager --channel=4 "emulator" >/dev/null # Use canary channel to get emulator 29.x for x86_64 image support
- echo y | sdkmanager "extras;android;m2repository" >/dev/null
- echo y | sdkmanager "system-images;android-$API;$EMU_FLAVOR;$ABI" >/dev/null # install our emulator
- echo no | avdmanager create avd --force -n test -k "system-images;android-$API;$EMU_FLAVOR;$ABI" -c 10M
- emulator -verbose -avd test -no-accel -no-snapshot -no-window $AUDIO -camera-back none -camera-front none -selinux permissive -qemu -m 2048 &
- android-wait-for-emulator
- adb shell input keyevent 82 &
script:
- "./gradlew clean build check connectedCheck --stacktrace"
deploy:
provider: releases
file_glob: true
file: "app/build/outputs/apk/release/AdbClipboard-*.apk"
skip_cleanup: true
on:
repo: PRosenb/AdbClipboard
tags: true
api_key:
secure: Mp7n5DcxpmUhmgKqCSmTb7CbYHWyTMd9Eti4ubyXdjFVuznOKhSsZRsEDilo/aqtQtjcXy7QE7G8/8F4L8AYAabAe2XpLddxqLMo6QR2HunM26VMy8onf+aTt1kDl2V9GeLnduJj+3s8v3iIO4oiNGTHfRYoUvK8bVkIXXADjxi1p566rslnIVYy3l/Sy9/2m5HcHgJIMQ+55cNkm3fvaVutGZG3E7FZa6GuNX88hMcu/GQK72oAJyee5FtcEgBOklZ5edfxW+Ir/NVt7HI7OW0B8fC9xGX6BW4NtQFgxouEuwD9k2XnCtfIyMRzfhIo0XYZg33QYlkCX92JDPzzmRWYpkY57JC3Vm8+7eMIx1fpZ0FKeHQJ+KCW6J9r3N0SzMmVzW2OScwU0Rj4dq6sbAyiAIo6PY1q6n+GHytMB18ggcmjlw2KIZTTcZU3tgQRzveZDcdnEpZXXsoOVhk/W9ICHHK4zskgArZVF0cfOCGYV/mG4U7Rqf38JHwP2PG+QYHpjDidaanyqkJwA3mbsg0Lw4U8/m2TCEL8589qZJAo4a9VhteqQ9WgyCJlAn06BdbCiPlLJBb8ZuwZeAZsd20aXX/cXc2xvAjAkIx/5fZGeVrZmvNztAl6wj0kv0j00sdHkv0oxn8PIOP0HJCeuzTfvvzM3LZNQDbntFfZjHw=
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
cache:
directories:
- "$HOME/.m2"
- "$HOME/.gradle"
- "$HOME/.gradle/caches/"
- "$HOME/.gradle/wrapper/"
# input from
# https://github.com/ankidroid/Anki-Android/blob/master/.travis.yml