blob: 87418ba518217dd6c5d2c6c674f3b78f8fb70850 [file] [log] [blame]
Alexander Afanasyev087c7c12015-02-02 00:21:21 -08001#!/usr/bin/env bash
2set -e
3set -x
4
Alexander Afanasyevf3812562016-01-21 16:28:33 -08005SDK_VERSION=24.4.1
Alexander Afanasyev652fb8e2017-07-07 10:46:09 -07006BUILD_TOOLS_VERSION=26.0.0
7COMPILE_SDK_VERSION=26
Alexander Afanasyev087c7c12015-02-02 00:21:21 -08008
Alexander Afanasyevf3812562016-01-21 16:28:33 -08009SDK=android-sdk-linux
Alexander Afanasyev087c7c12015-02-02 00:21:21 -080010
Alexander Afanasyevf3812562016-01-21 16:28:33 -080011export ANDROID_HOME=`pwd`/$SDK
12export PATH=${PATH}:${ANDROID_HOME}/tools:${ANDROID_HOME}/platform-tools
13
14if [ ! -d $SDK ]; then
15 wget -nv http://dl.google.com/android/android-sdk_r$SDK_VERSION-linux.tgz
16 tar zxf android-sdk_r$SDK_VERSION-linux.tgz
17 rm android-sdk_r$SDK_VERSION-linux.tgz
Alexander Afanasyev087c7c12015-02-02 00:21:21 -080018
19 echo "y" | android update sdk --filter platform-tools,build-tools-$BUILD_TOOLS_VERSION,android-$COMPILE_SDK_VERSION,extra-android-support,extra-android-m2repository,extra-google-m2repository --no-ui --all --force
20 echo "y" | android update sdk --filter "android-19" --no-ui --all --force
21fi
22
Alexander Afanasyevf3812562016-01-21 16:28:33 -080023echo sdk.dir=`pwd`/$SDK >> local.properties