/
.travis.yml
64 lines (58 loc) · 1.89 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
language: android
dist: trusty
sudo: required
jdk:
- openjdk11
global:
# switch glibc to a memory conserving mode
- MALLOC_ARENA_MAX=2
# wait up to 10 minutes for adb to connect to emulator
- ADB_INSTALL_TIMEOUT=10
env:
global:
- TARGET_VERSION=30
- ANDROID_BUILD_TOOLS_VERSION=30.0.2
- ANDROID_HOME=~/android-sdk
android:
licenses:
- 'android-sdk-preview-license-.+'
- 'android-sdk-license-.+'
- 'google-gdk-license-.+'
components:
- tools
- platform-tools
- build-tools-30.0.2
- android-21
- android-31
- android ${TARGET_VERSION}
- extra-google-google_play_services
- extra-google-m2repository
- extra-android-m2repository
- addon-google_apis-google-25
- sys-img-armeabi-v7a-android-21
#taken from: https://travis-ci.community/t/sdkmanager-to-run-with-java-11/11978/2
before_install:
- touch $HOME/.android/repositories.cfg
- wget "https://dl.google.com/android/repository/commandlinetools-linux-7302050_latest.zip" -O commandlinetools.zip
- unzip commandlinetools.zip -d $ANDROID_HOME/
- yes | $ANDROID_HOME/cmdline-tools/bin/sdkmanager "platforms;android-${TARGET_VERSION}" --sdk_root=$ANDROID_HOME
- yes | $ANDROID_HOME/cmdline-tools/bin/sdkmanager "build-tools;${ANDROID_BUILD_TOOLS_VERSION}" --sdk_root=$ANDROID_HOME
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/
# Emulator Management: Create, Start and Wait
before_script:
- echo no | android create avd --force -n test -t android-21
- emulator -avd test -no-audio -no-window &
- android-wait-for-emulator
- adb shell input keyevent 82 &
- export CLOUDINARY_URL=$(bash tools/get_test_cloud.sh);
script: ./gradlew clean connectedCheck
notifications:
email:
recipients:
- sdk_developers@cloudinary.com