Files
renderdoc/scripts/travis/android_setup.sh
T
Cody Northrop 83e1e1506b android: Update packaging to work with latest SDK
This removes dependencies on deprecated tools "ant" and "android project"

The new method relies on JAVA_HOME and ANDROID_SDK being set.

It also requires specific versions of the Android build-tools (26.0.1) and
platforms (android-23).  See updates to CONTRIBUTING.md and our Travis-CI
config for details.

Travis-CI and documentation also roll forward to latest public NDK r14b.
2017-08-17 10:00:01 +01:00

34 lines
1.1 KiB
Bash

#!/bin/sh
set -ev
sudo apt-get -qq update
sudo apt-get install -y cmake
export ARCH=`uname -m`
# Pull known working tools toward the end of 2016
wget http://dl.google.com/android/repository/android-ndk-r13b-linux-${ARCH}.zip
wget https://dl.google.com/android/repository/tools_r25.2.5-linux.zip
wget https://dl.google.com/android/repository/platform-tools_r25.0.3-linux.zip
wget https://dl.google.com/android/repository/build-tools_r25.0.2-linux.zip
unzip -u -q android-ndk-r13b-linux-${ARCH}.zip
unzip -u -q tools_r25.2.5-linux.zip
unzip -u -q platform-tools_r25.0.3-linux.zip
unzip -u -q build-tools_r25.0.2-linux.zip
# Munge the build-tools layout
mkdir -p build-tools/25.0.2
mv android-7.1.1/* build-tools/25.0.2/
export ANDROID_HOME=`pwd`/tools
export JAVA_HOME="/usr/lib/jvm/java-8-oracle"
export ANDROID_NDK=`pwd`/android-ndk-r13b
export ANDROID_SDK=`pwd`
export PATH=`pwd`/android-ndk-r13b:$PATH
export PATH=`pwd`/tools:$PATH
export PATH=`pwd`/platform-tools:$PATH
export PATH=`pwd`/build-tools/25.0.2:$PATH
# Answer "yes" to any license acceptance requests
(while sleep 3; do echo "y"; done) | android update sdk --no-ui -s -t android-23