Skip to content

Commit

Permalink
Update Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
seanghay authored Sep 12, 2021
1 parent e6a3d95 commit 022c113
Showing 1 changed file with 13 additions and 17 deletions.
30 changes: 13 additions & 17 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,24 +1,20 @@
# Reference: https://dev.to/lavolpe/gitlab-ci-for-android-2021-update-2hhl
FROM openjdk:8-jdk

FROM openjdk:11-jdk
MAINTAINER Seanghay


ENV ANDROID_COMPILE_SDK=30
ENV ANDROID_BUILD_TOOLS=30.0.3
ENV ANDROID_SDK_TOOLS=6858069_latest
ENV ANDROID_COMPILE_SDK=29
ENV ANDROID_BUILD_TOOLS=29.0.2
ENV ANDROID_SDK_TOOLS=4333796

RUN apt-get --quiet update --yes
RUN apt-get --quiet install --yes wget tar unzip lib32stdc++6 lib32z1
RUN apt-get --quiet install --yes wget tar unzip lib32stdc++6
RUN apt-get -qq install curl
RUN wget --quiet --output-document=android-sdk.zip https://dl.google.com/android/repository/commandlinetools-linux-${ANDROID_SDK_TOOLS}.zip
RUN wget --quiet --output-document=android-sdk.zip https://dl.google.com/android/repository/sdk-tools-linux-${ANDROID_SDK_TOOLS}.zip
RUN unzip -d android-sdk-linux android-sdk.zip
RUN echo y | android-sdk-linux/cmdline-tools/bin/sdkmanager --sdk_root=. "platforms;android-${ANDROID_COMPILE_SDK}" >/dev/null
RUN echo y | android-sdk-linux/cmdline-tools/bin/sdkmanager --sdk_root=. "platform-tools" >/dev/null
RUN echo y | android-sdk-linux/cmdline-tools/bin/sdkmanager --sdk_root=. "build-tools;${ANDROID_BUILD_TOOLS}" >/dev/null

ENV ANDROID_SDK_ROOT=$PWD
ENV PATH=$PATH:$PWD/platform-tools/

RUN yes | android-sdk-linux/cmdline-tools/bin/sdkmanager --sdk_root=. --licenses

RUN echo y | android-sdk-linux/tools/bin/sdkmanager "platforms;android-${ANDROID_COMPILE_SDK}" >/dev/null
RUN echo y | android-sdk-linux/tools/bin/sdkmanager "platform-tools" >/dev/null
RUN echo y | android-sdk-linux/tools/bin/sdkmanager "build-tools;${ANDROID_BUILD_TOOLS}" >/dev/null
ENV ANDROID_HOME=$PWD/android-sdk-linux
ENV PATH=$PATH:$PWD/android-sdk-linux/platform-tools/
RUN yes | android-sdk-linux/tools/bin/sdkmanager --licenses
ENV GRADLE_USER_HOME=$PWD/.gradle

0 comments on commit 022c113

Please sign in to comment.