Skip to content

Commit 60d9606

Browse files
committed
travis android build tools for Java 11
Travis doesn't provide an image with new enought android build tools that work with Java 11 to even download a newer one. So we download a new one and swap it in.
1 parent 36d483a commit 60d9606

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

.travis.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@ sudo: false
33
jdk: oraclejdk11
44
dist: trusty
55

6+
env:
7+
global:
8+
- ANDROID_HOME=/usr/local/android-sdk
9+
- ANDROID_TOOLS=${ANDROID_HOME}/cmdline-tools/latest
10+
- PATH=${ANDROID_HOME}:${ANDROID_HOME}/emulator:${ANDROID_TOOLS}:${ANDROID_TOOLS}/bin:${ANDROID_HOME}/platform-tools:${PATH}
11+
612
android:
713
components:
814
- tools
@@ -16,8 +22,13 @@ android:
1622
- '.+'
1723
- 'android-sdk-license-.+'
1824
before_install:
19-
- yes | sdkmanager "platforms;android-31"
20-
- yes | sdkmanager "build-tools;31.0.0"
25+
# Download newer Android tools that are compatible with Java 11
26+
- wget -q "https://dl.google.com/android/repository/commandlinetools-linux-7583922_latest.zip" -O android-commandline-tools-linux.zip
27+
- mkdir -p ${ANDROID_HOME}/cmdline-tools
28+
- unzip -q android-commandline-tools-linux.zip -d ${ANDROID_HOME}/cmdline-tools
29+
- mv ${ANDROID_HOME}/cmdline-tools/cmdline-tools ${ANDROID_HOME}/cmdline-tools/latest
30+
- yes | ${ANDROID_TOOLS}/bin/sdkmanager "platforms;android-31"
31+
- yes | ${ANDROID_TOOLS}/bin/sdkmanager "build-tools;31.0.0"
2132
- pwd
2233
- ls -la
2334
- cd OneSignalSDK

0 commit comments

Comments
 (0)