Skip to content

Commit

Permalink
Add script to install Android SDK locally
Browse files Browse the repository at this point in the history
  • Loading branch information
randr0id committed Apr 30, 2018
1 parent 58926dd commit 4de6927
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ RUN rm -f /etc/ssl/certs/java/cacerts; \
/var/lib/dpkg/info/ca-certificates-java.postinst configure

RUN curl -s "https://dl.google.com/android/repository/sdk-tools-linux-${VERSION_SDK_TOOLS}.zip" > /sdk.zip && \
unzip /sdk.zip -d /sdk && \
unzip /sdk.zip -d ${ANDROID_HOME} && \
rm -v /sdk.zip

RUN mkdir -p "${ANDROID_HOME}/licenses/" && \
Expand Down
11 changes: 11 additions & 0 deletions install-android-sdk.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
VERSION_SDK_TOOLS="3859397"

curl -s "https://dl.google.com/android/repository/sdk-tools-linux-${VERSION_SDK_TOOLS}.zip" > ~/sdk.zip && \
unzip ~/sdk.zip -d ${ANDROID_HOME} && rm -v ~/sdk.zip

mkdir -p ~/.android && touch ~/.android/repositories.cfg

while read -r package; do PACKAGES="${PACKAGES}${package} "; done < packages.txt && \
"${ANDROID_HOME}/tools/bin/sdkmanager" ${PACKAGES}

"${ANDROID_HOME}/tools/bin/sdkmanager" --update

0 comments on commit 4de6927

Please sign in to comment.