forked from OneSignal/OneSignal-Android-SDK
-
Notifications
You must be signed in to change notification settings - Fork 5
/
.travis.yml
46 lines (44 loc) · 1.57 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
language: android
sudo: false
jdk: oraclejdk11
dist: trusty
env:
global:
- JAVA_TOOL_OPTIONS=-Dhttps.protocols=TLSv1.2
- ANDROID_HOME=/usr/local/android-sdk
- ANDROID_TOOLS=${ANDROID_HOME}/cmdline-tools/latest
- PATH=${ANDROID_HOME}:${ANDROID_HOME}/emulator:${ANDROID_TOOLS}:${ANDROID_TOOLS}/bin:${ANDROID_HOME}/platform-tools:${PATH}
android:
components:
- tools
- tools # Include again to work around travis not using the latest.
# https://github.com/travis-ci/travis-ci/issues/6193
# Required to get the newest platform-tools.
- platform-tools
- build-tools-31.0.0
- android-31
licenses:
- '.+'
- 'android-sdk-license-.+'
before_install:
# Download newer Android tools that are compatible with Java 11
- wget -q "https://dl.google.com/android/repository/commandlinetools-linux-7583922_latest.zip" -O android-commandline-tools-linux.zip
- mkdir -p ${ANDROID_HOME}/cmdline-tools
- unzip -q android-commandline-tools-linux.zip -d ${ANDROID_HOME}/cmdline-tools
- mv ${ANDROID_HOME}/cmdline-tools/cmdline-tools ${ANDROID_HOME}/cmdline-tools/latest
- yes | ${ANDROID_TOOLS}/bin/sdkmanager "platforms;android-31"
- yes | ${ANDROID_TOOLS}/bin/sdkmanager "build-tools;31.0.0"
- pwd
- ls -la
- cd OneSignalSDK
before_script:
- chmod +x gradlew
script:
- ./gradlew unittest:testReleaseUnitTest --console=plain
after_failure:
- cat build/reports/lint-results.xml
- cat build/outputs/lint-results-debug.xml
- cd ../..
- pwd
- ls -la $HOME
- ls -la $HOME/android-sdk