CI: Install SDK only if necessary

This commit is contained in:
Daniel Martí 2016-02-26 18:20:42 +00:00
parent d1b758147b
commit affa569a79

View File

@ -4,19 +4,17 @@ before_script:
- apt-get -q install -y wget tar unzip python3
- echo " == Installing OpenJDK 7"
- apt-get -q install -y openjdk-7-jdk
- echo " == Installing packages required by the 32-bit SDK"
- apt-get -q install -y lib32stdc++6 lib32z1
- echo " == Installing the Android SDK"
- wget -q -O android-sdk.tgz https://dl.google.com/android/android-sdk_r24.4.1-linux.tgz
- tar -xzf android-sdk.tgz
- export ANDROID_HOME=$PWD/android-sdk-linux
- export PATH="$ANDROID_HOME/tools:$PATH"
- echo " == Installing Android SDK components"
- echo y | android -s update sdk --no-ui -a -t platform-tools,tools,build-tools-23.0.2,android-22,extra-android-m2repository
- export PATH="$ANDROID_HOME/platform-tools:$PATH"
- export PATH="$ANDROID_HOME/build-tools/23.0.2:$PATH"
- echo " == Installing Android emulator images"
- echo y | android -s update sdk --no-ui -a -t android-10
- test -z "$ANDROID_HOME" &&
echo " == Installing Android SDK" &&
apt-get -q install -y lib32stdc++6 lib32z1 &&
wget -q -O android-sdk.tgz https://dl.google.com/android/android-sdk_r24.4.1-linux.tgz &&
tar -xzf android-sdk.tgz &&
export ANDROID_HOME=$PWD/android-sdk-linux &&
export PATH="$ANDROID_HOME/tools:$PATH" &&
echo y | android -s update sdk --no-ui -a -t platform-tools,tools,build-tools-23.0.2,android-22,extra-android-m2repository &&
export PATH="$ANDROID_HOME/platform-tools:$PATH" &&
export PATH="$ANDROID_HOME/build-tools/23.0.2:$PATH" &&
echo y | android -s update sdk --no-ui -a -t android-10
test:
script: