Skip to content
This repository has been archived by the owner on Mar 31, 2022. It is now read-only.

Add Build tools 30.0.2. Replace ANDROID_HOME with ANDROID_SDK_ROOT #318

Merged
merged 3 commits into from
Nov 4, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
## UPCOMING

## `v2020_09_22_1`

* new preinstalled package: `build-tools-30.0.2`
* Deprecated ANDROID_HOME replaced with ANDROID_SDK_ROOT

https://github.com/bitrise-docker/android/pull/318

## `v2020_06_14_1`

* Deprecated SDK tools replaced with Command line Tools: https://github.com/bitrise-docker/android/pull/300
Expand Down
16 changes: 9 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
FROM quay.io/bitriseio/bitrise-base:alpha

ENV ANDROID_SDK_ROOT /opt/android-sdk-linux
# Preserved for backwards compatibility
ENV ANDROID_HOME /opt/android-sdk-linux


# ------------------------------------------------------
# --- Install required tools

Expand All @@ -18,15 +19,15 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get install -y openjdk-8-jdk libc6:i386 l


# ------------------------------------------------------
# --- Download Android Command line Tools into $ANDROID_HOME
# --- Download Android Command line Tools into $ANDROID_SDK_ROOT

RUN cd /opt \
&& wget -q https://dl.google.com/android/repository/commandlinetools-linux-6609375_latest.zip -O android-commandline-tools.zip \
&& mkdir -p ${ANDROID_HOME}/cmdline-tools \
&& unzip -q android-commandline-tools.zip -d ${ANDROID_HOME}/cmdline-tools \
&& mkdir -p ${ANDROID_SDK_ROOT}/cmdline-tools \
&& unzip -q android-commandline-tools.zip -d ${ANDROID_SDK_ROOT}/cmdline-tools \
&& rm android-commandline-tools.zip

ENV PATH ${PATH}:${ANDROID_HOME}/platform-tools:${ANDROID_HOME}/cmdline-tools/tools/bin
ENV PATH ${PATH}:${ANDROID_SDK_ROOT}/platform-tools:${ANDROID_SDK_ROOT}/cmdline-tools/tools/bin

# ------------------------------------------------------
# --- Install Android SDKs and other build packages
Expand Down Expand Up @@ -66,6 +67,7 @@ RUN yes | sdkmanager \
"platforms;android-19" \
"platforms;android-17" \
"platforms;android-15" \
"build-tools;30.0.2" \
"build-tools;30.0.0" \
"build-tools;29.0.3" \
"build-tools;29.0.2" \
Expand Down Expand Up @@ -177,7 +179,7 @@ RUN npm install -g firebase-tools
# Required for Android ARM Emulator
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y libqt5widgets5
ENV QT_QPA_PLATFORM offscreen
ENV LD_LIBRARY_PATH ${ANDROID_HOME}/emulator/lib64:${ANDROID_HOME}/emulator/lib64/qt/lib
ENV LD_LIBRARY_PATH ${ANDROID_SDK_ROOT}/emulator/lib64:${ANDROID_SDK_ROOT}/emulator/lib64/qt/lib

# -------------------------------------------------------
# Tools to parse apk/aab info in deploy-to-bitrise-io step
Expand All @@ -195,5 +197,5 @@ RUN cd /opt \
# Cleaning
RUN apt-get clean

ENV BITRISE_DOCKER_REV_NUMBER_ANDROID v2020_06_14_1
ENV BITRISE_DOCKER_REV_NUMBER_ANDROID v2020_09_22_1
CMD bitrise -version