blob: e17e09c0dd4630b0ea18e428631f1c2ca14f594e [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
11export PATH=$PATH:`pwd`/gradle-2.2.1/bin
12
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
22wget -q https://services.gradle.org/distributions/gradle-2.2.1-bin.zip
23unzip gradle-2.2.1-bin.zip
24rm gradle-2.2.1-bin.zip
25
26echo sdk.dir=`pwd`/android-sdk-linux >> local.properties