Skip to content

Commit

Permalink
Update to Android SDK and build tools to 28
Browse files Browse the repository at this point in the history
  • Loading branch information
randr0id committed Oct 8, 2018
1 parent 4de6927 commit c5abf17
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# https://github.com/randr0id/android-docker
#

FROM ubuntu:17.10
FROM ubuntu:18.04
LABEL maintainer="randy@randr0id.com"

ARG BUILD_DATE
Expand All @@ -20,14 +20,14 @@ LABEL org.label-schema.url="https://hub.docker.com/r/randr0id/android-docker"
LABEL org.label-schema.vcs-url="https://github.com/randr0id/android-docker"
LABEL org.label-schema.vcs-ref=${VCS_REF}

ENV VERSION_SDK_TOOLS "3859397"
ENV VERSION_SDK_TOOLS "4333796"

ENV ANDROID_HOME "/sdk"
ENV PATH "${PATH}:${ANDROID_HOME}/tools"
ENV DEBIAN_FRONTEND noninteractive

RUN apt-get -qq update && \
apt-get install -qqy --no-install-recommends \
RUN apt -qq update && \
apt install -qqy --no-install-recommends \
build-essential \
bzip2 \
curl \
Expand Down Expand Up @@ -69,4 +69,4 @@ COPY install-google-cloud-sdk.sh /utils
COPY start-test-emulator.sh /utils
COPY wait-for-emulator.sh /utils

CMD ${ANDROID_HOME}/tools/bin/sdkmanager --update
CMD "${ANDROID_HOME}/tools/bin/sdkmanager" --update
6 changes: 3 additions & 3 deletions install-android-sdk.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
VERSION_SDK_TOOLS="3859397"
VERSION_SDK_TOOLS="4333796"

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
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" "${PACKAGES}"

"${ANDROID_HOME}/tools/bin/sdkmanager" --update
4 changes: 2 additions & 2 deletions packages.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
add-ons;addon-google_apis-google-24
build-tools;26.0.2
build-tools;27.0.3
build-tools;28.0.3
platform-tools
platforms;android-26
platforms;android-27
platforms;android-28

0 comments on commit c5abf17

Please sign in to comment.