blob: 4b801dd8ff104875524f52ecc6b70415f5fa8d9a [file] [log] [blame]
Alexander Afanasyev087c7c12015-02-02 00:21:21 -08001#!/usr/bin/env bash
2set -e
3set -x
4
5SDK_TOOLS_VERSION=24.0.2
6BUILD_TOOLS_VERSION=21.1.2
7COMPILE_SDK_VERSION=21
8
9export ANDROID_HOME=`pwd`/android-sdk-linux
10export PATH=${PATH}:${ANDROID_HOME}/tools:${ANDROID_HOME}/platform-tools
Alexander Afanasyev54732342015-12-02 16:34:25 -080011export PATH=$PATH:`pwd`/gradle-2.9/bin
Alexander Afanasyev087c7c12015-02-02 00:21:21 -080012
13if [ ! -d android-sdk-linux ]; then
14 wget -q http://dl.google.com/android/android-sdk_r24.0.2-linux.tgz
15 tar zxf android-sdk_r24.0.2-linux.tgz
16 rm android-sdk_r24.0.2-linux.tgz
17
18 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
19 echo "y" | android update sdk --filter "android-19" --no-ui --all --force
20fi
21
Alexander Afanasyev54732342015-12-02 16:34:25 -080022wget -q https://services.gradle.org/distributions/gradle-2.9-bin.zip
23unzip gradle-2.9-bin.zip
24rm gradle-2.9-bin.zip
Alexander Afanasyev087c7c12015-02-02 00:21:21 -080025
26echo sdk.dir=`pwd`/android-sdk-linux >> local.properties