Skip to content

Commit 47cd628

Browse files
committed
Fix travis for building against JDK 11
1 parent 96f8f53 commit 47cd628

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

.travis.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
language: android
22
dist: trusty
33
jdk: openjdk11
4+
env:
5+
global:
6+
- TARGET_VERSION=30
7+
- ANDROID_BUILD_TOOLS_VERSION=30.0.3
8+
- ANDROID_HOME=~/android-sdk
49
android:
510
components:
611
# Uncomment the lines below if you want to
@@ -23,10 +28,15 @@ android:
2328
# if you need to run emulator(s) during your tests
2429
- sys-img-x86-android-30
2530
before_install:
26-
- chmod +x gradlew
27-
- yes | sdkmanager "platforms;android-30"
31+
- touch $HOME/.android/repositories.cfg
32+
- wget "https://dl.google.com/android/repository/commandlinetools-linux-7302050_latest.zip" -O commandlinetools.zip
33+
- unzip commandlinetools.zip -d $ANDROID_HOME/
34+
- yes | $ANDROID_HOME/cmdline-tools/bin/sdkmanager "platforms;android-${TARGET_VERSION}" --sdk_root=$ANDROID_HOME
35+
- yes | $ANDROID_HOME/cmdline-tools/bin/sdkmanager "build-tools;${ANDROID_BUILD_TOOLS_VERSION}" --sdk_root=$ANDROID_HOME
2836
install:
2937
# Skip the default install stage
3038
- true
39+
before_script:
40+
- chmod +x gradlew
3141
script:
3242
- ./gradlew assemble

0 commit comments

Comments
 (0)