Created
July 22, 2018 14:10
-
-
Save warnyul/f12bcbb595542678b643e7aa9f0e68f6 to your computer and use it in GitHub Desktop.
Download Android SDK for MacOS on Travis CI
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
mkdir -p $HOME/android-sdk-dl | |
if test ! -e $HOME/android-sdk-dl/sdk-tools.zip; then | |
curl https://dl.google.com/android/repository/sdk-tools-darwin-4333796.zip > $HOME/android-sdk-dl/sdk-tools.zip | |
fi | |
unzip -qq -n $HOME/android-sdk-dl/sdk-tools.zip -d $ANDROID_HOME | |
# Install or update Android SDK components (will not do anything if already up to date thanks to the cache mechanism) | |
yes | $ANDROID_HOME/tools/bin/sdkmanager --licenses > /dev/null | |
yes | $ANDROID_HOME/tools/bin/sdkmanager 'tools' > /dev/null | |
yes | $ANDROID_HOME/tools/bin/sdkmanager 'platform-tools' > /dev/null | |
yes | $ANDROID_HOME/tools/bin/sdkmanager 'build-tools;27.0.3' > /dev/null | |
yes | $ANDROID_HOME/tools/bin/sdkmanager 'platforms;android-27' > /dev/null | |
yes | $ANDROID_HOME/tools/bin/sdkmanager 'extras;google;m2repository' > /dev/null |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment