-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
13 additions
and
17 deletions.
There are no files selected for viewing
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
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 |