Update Travis Android SDK and NDK gear

pull/762/head
Jeffrey Walton 2018-12-09 09:43:15 -05:00
parent 709ca5c480
commit fbb9b40397
No known key found for this signature in database
GPG Key ID: B36AB348921B1838
3 changed files with 4 additions and 21 deletions

View File

@ -200,6 +200,7 @@ before_install:
# https://github.com/travis-ci/travis-ci/issues/9037
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A145
sudo apt-get update
source TestScripts/setenv-travis.sh
bash TestScripts/install-android.sh
fi
if [[ "$BUILD_OS" == "linux" ]] && [[ "$BUILD_MODE" == "autotools" ]]; then

View File

@ -1,31 +1,10 @@
#!/usr/bin/env bash
set -e
# for local debugging
if [[ -f ./setenv-travis.sh ]]; then
echo "Setting variables in setenv-travis.sh"
source ./setenv-travis.sh
elif [[ -f ./TestScripts/setenv-travis.sh ]]; then
echo "Setting variables in TestScripts/setenv-travis.sh"
source ./TestScripts/setenv-travis.sh
fi
if [[ -z "$ANDROID_SDK_ROOT" ]] || [[ -z "$ANDROID_NDK_ROOT" ]]; then
echo "ANDROID_SDK_ROOT or ANDROID_NDK_ROOT is not set"
fi
# install android deps
sudo apt-get -qq update
sudo apt-get -qq install --no-install-recommends openjdk-8-jdk unzip
# Required directories, set in the environment
mkdir -p "$ANDROID_HOME"
mkdir -p "$ANDROID_SDK_ROOT"
mkdir -p "$ANDROID_NDK_ROOT"
# https://stackoverflow.com/a/47028911/608639
touch "$ANDROID_HOME/repositories.cfg"
# android skd/ndk
curl -Lo /tmp/android-sdk.zip https://dl.google.com/android/repository/sdk-tools-linux-3859397.zip
unzip -qq /tmp/android-sdk.zip -d "$ANDROID_SDK"

View File

@ -11,3 +11,6 @@ export ANDROID_NDK_ROOT="$ANDROID_NDK"
mkdir -p "$ANDROID_HOME"
mkdir -p "$ANDROID_SDK_ROOT"
mkdir -p "$ANDROID_NDK_ROOT"
# https://stackoverflow.com/a/47028911/608639
touch "$ANDROID_HOME/repositories.cfg"