Alexander Afanasyev | 087c7c1 | 2015-02-02 00:21:21 -0800 | [diff] [blame^] | 1 | #!/usr/bin/env bash |
| 2 | set -e |
| 3 | set -x |
| 4 | |
| 5 | SDK_TOOLS_VERSION=24.0.2 |
| 6 | BUILD_TOOLS_VERSION=21.1.2 |
| 7 | COMPILE_SDK_VERSION=21 |
| 8 | |
| 9 | export ANDROID_HOME=`pwd`/android-sdk-linux |
| 10 | export PATH=${PATH}:${ANDROID_HOME}/tools:${ANDROID_HOME}/platform-tools |
| 11 | export PATH=$PATH:`pwd`/gradle-2.2.1/bin |
| 12 | |
| 13 | if [ ! -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 |
| 20 | fi |
| 21 | |
| 22 | wget -q https://services.gradle.org/distributions/gradle-2.2.1-bin.zip |
| 23 | unzip gradle-2.2.1-bin.zip |
| 24 | rm gradle-2.2.1-bin.zip |
| 25 | |
| 26 | echo sdk.dir=`pwd`/android-sdk-linux >> local.properties |