blob: fef1aaa16d02cc3cd301572e96113e510c9752f8 [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 -08005GRADLE_VERSION=2.10
6SDK_VERSION=24.4.1
Alexander Afanasyev087c7c12015-02-02 00:21:21 -08007BUILD_TOOLS_VERSION=21.1.2
8COMPILE_SDK_VERSION=21
9
Alexander Afanasyevf3812562016-01-21 16:28:33 -080010SDK=android-sdk-linux
Alexander Afanasyev087c7c12015-02-02 00:21:21 -080011
Alexander Afanasyevf3812562016-01-21 16:28:33 -080012export ANDROID_HOME=`pwd`/$SDK
13export PATH=${PATH}:${ANDROID_HOME}/tools:${ANDROID_HOME}/platform-tools
14
15if [ ! -d $SDK ]; then
16 wget -nv http://dl.google.com/android/android-sdk_r$SDK_VERSION-linux.tgz
17 tar zxf android-sdk_r$SDK_VERSION-linux.tgz
18 rm android-sdk_r$SDK_VERSION-linux.tgz
Alexander Afanasyev087c7c12015-02-02 00:21:21 -080019
20 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
21 echo "y" | android update sdk --filter "android-19" --no-ui --all --force
22fi
23
Alexander Afanasyevf3812562016-01-21 16:28:33 -080024if [ ! -d gradle-$GRADLE_VERSION ]; then
25 wget -nv https://services.gradle.org/distributions/gradle-$GRADLE_VERSION-bin.zip
26 unzip gradle-$GRADLE_VERSION-bin.zip
27 rm gradle-$GRADLE_VERSION-bin.zip
Alexander Afanasyev087c7c12015-02-02 00:21:21 -080028
Alexander Afanasyevf3812562016-01-21 16:28:33 -080029 ln -s `pwd`/gradle-$GRADLE_VERSION/bin/gradle gradle
30fi
31
32echo sdk.dir=`pwd`/$SDK >> local.properties