Update Travis Android SDK and NDK gear

This commit is contained in:
Jeffrey Walton 2018-12-09 04:19:00 -05:00
parent b324f18777
commit 435b7cabd3
No known key found for this signature in database
GPG Key ID: B36AB348921B1838
2 changed files with 13 additions and 10 deletions

View File

@ -20,11 +20,11 @@ compiler:
env:
global:
- BUILD_JOBS=2
- ANDROID_HOME=$HOME/.android
- ANDROID_SDK=$HOME/android/sdk/
- ANDROID_NDK=$HOME/android/sdk/ndk-bundle
- ANDROID_SDK_ROOT=$ANDROID_SDK
- ANDROID_NDK_ROOT=$ANDROID_NDK
- ANDROID_HOME="$HOME/.android"
- ANDROID_SDK="$HOME/android/sdk/"
- ANDROID_NDK="$HOME/android/sdk/ndk-bundle"
- ANDROID_SDK_ROOT="$ANDROID_SDK"
- ANDROID_NDK_ROOT="$ANDROID_NDK"
matrix:
- BUILD_MODE="all"

View File

@ -1,17 +1,20 @@
#!/bin/bash
#!/usr/bin/env bash
set -e
# install android deps
sudo apt-get -qq update
sudo apt-get -qq install --no-install-recommends openjdk-8-jdk unzip
# Required directories
mkdir =p "$HOME/android"
mkdir -p "$ANDROID_HOME"
# android skd/ndk
curl -Lo /tmp/android-sdk.zip https://dl.google.com/android/repository/sdk-tools-linux-3859397.zip
mkdir $HOME/android
unzip -qq /tmp/android-sdk.zip -d $HOME/android/sdk/
unzip -qq /tmp/android-sdk.zip -d "$ANDROID_SDK/"
rm -f /tmp/android-sdk.zip
echo y | $HOME/android/sdk/tools/bin/sdkmanager --update > /dev/null
echo y | "$ANDROID_SDK/tools/bin/sdkmanager" --update > /dev/null
for package in "ndk-bundle"; do
echo install android $package
echo y | $HOME/android/sdk/tools/bin/sdkmanager "$package" > /dev/null
echo y | "$ANDROID_SDK/tools/bin/sdkmanager" "$package" > /dev/null
done