Merge pull request #33082 from akien-mga/travis-android-force-openjdk8

Travis: Force installing OpenJDK8 for Android SDK compatibility
This commit is contained in:
Rémi Verschelde 2019-10-26 14:48:02 +02:00 committed by GitHub
commit ef9d3c0d88
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 4 deletions

View file

@ -71,6 +71,10 @@ matrix:
env: PLATFORM=android TOOLS=no TARGET=release_debug CACHE_NAME=${PLATFORM}-clang EXTRA_ARGS="warnings=extra werror=yes"
os: linux
compiler: clang
addons:
apt:
packages:
- openjdk-8-jdk
- name: macOS editor (debug, Clang)
stage: build
@ -116,14 +120,14 @@ before_install:
install:
- pip install --user scons;
- if [ "$TRAVIS_OS_NAME" = "linux" ] && [ "$PLATFORM" = "android" ]; then
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64;
export PATH=/usr/lib/jvm/java-8-openjdk-amd64/jre/bin:${PATH};
java -version;
misc/travis/android-tools-linux.sh;
fi
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then
export PATH=${PATH}:/Users/travis/Library/Python/2.7/bin;
fi
- if [ "$TRAVIS_OS_NAME" = "osx" ] && [ "$PLATFORM" = "android" ]; then
misc/travis/android-tools-osx.sh;
fi
before_script:
- if [ "$PLATFORM" = "android" ]; then

View file

@ -70,9 +70,10 @@ if [ ! -d $ANDROID_NDK_DIR ]; then
echo
fi
echo "Installing: Android Tools ..."
mkdir -p ~/.android && echo "count=0" > ~/.android/repositories.cfg
echo "Installing: Accepting Licenses ..."
yes | $ANDROID_SDK_DIR/tools/bin/sdkmanager --licenses > /dev/null
echo "Installing: Android Build and Platform Tools ..."
yes | $ANDROID_SDK_DIR/tools/bin/sdkmanager 'tools' > /dev/null
yes | $ANDROID_SDK_DIR/tools/bin/sdkmanager 'platform-tools' > /dev/null
yes | $ANDROID_SDK_DIR/tools/bin/sdkmanager 'build-tools;28.0.3' > /dev/null