Skip to content

Commit

Permalink
added android command lines tools to dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
goschale committed May 27, 2022
1 parent 934b89a commit 3275f52
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions docker/Dockerfile.jenkins
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ FROM debian:buster
# Adapt the paramters below to change the dependencies.
#
# Android SDK 26.1.1
ARG ANDROID_SDK_URL="https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip"
#ARG ANDROID_SDK_URL="https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip"
ARG ANDROID_SDK_URL="https://dl.google.com/android/repository/commandlinetools-linux-8512546_latest.zip"
ARG SDKMANAGER_PACKAGES="build-tools;30.0.3 platforms;android-28 cmake;3.6.4111459 system-images;android-28;default;x86_64 emulator platform-tools"
# Arguments, Environment
# ----------------------
Expand All @@ -21,7 +22,8 @@ ENV ANDROID_SDK_ROOT=$USER_HOME/android/sdk
ENV ANDROID_AVD_HOME=$USER_HOME/avds
# Deprecated: Still used by gradle, once gradle respects ANDROID_SDK_ROOT, this can be removed
ENV ANDROID_HOME=$ANDROID_SDK_ROOT
ARG _SDKMANAGER=$ANDROID_SDK_ROOT/tools/bin/sdkmanager
ENV PATH=$PATH:$ANDROID_HOME/cmdline-tools/latest/bin
ARG _SDKMANAGER=$ANDROID_SDK_ROOT/cmdline-tools/latest/bin/sdkmanager
# System Packages
# ---------------
#
Expand Down Expand Up @@ -72,10 +74,13 @@ RUN mkdir -p $ANDROID_AVD_HOME
# Android SDK
# ------------------
#
ARG _CMD_LINE=$ANDROID_SDK_ROOT/cmdline-tools
RUN curl $ANDROID_SDK_URL --output /tmp/android_sdk.zip \
&& mkdir -p $ANDROID_SDK_ROOT \
&& unzip -d $ANDROID_SDK_ROOT /tmp/android_sdk.zip \
&& rm /tmp/android_sdk.zip
&& rm /tmp/android_sdk.zip \
&& mkdir -p $_CMD_LINE/latest \
&& mv $_CMD_LINE/bin $_CMD_LINE/lib $_CMD_LINE/source.properties $_CMD_LINE/latest/
# Android NDK
# ----------------
#
Expand All @@ -98,6 +103,6 @@ RUN if [ ! -z "$SDKMANAGER_PACKAGES" ]; then yes | $_SDKMANAGER $SDKMANAGER_PACK
# JAVA_TOOL_OPTIONS and the command line parameters.
# We still use it here to ensure that these settings
# are respected, no matter what is configured elsewhere.
ENV _JAVA_OPTIONS="-XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap"
ENV _JAVA_OPTIONS="-XX:+UnlockExperimentalVMOptions"
# Accept SDK licenses
RUN yes | $_SDKMANAGER --licenses

0 comments on commit 3275f52

Please sign in to comment.