2020-07-06 12:48:26 -07:00
|
|
|
FROM gradle:6.1.1-jdk8
|
2020-07-05 11:09:18 -07:00
|
|
|
|
|
|
|
ENV ANDROID_SDK_URL https://dl.google.com/android/repository/sdk-tools-linux-3859397.zip
|
2020-07-06 12:48:26 -07:00
|
|
|
ENV ANDROID_SDK_CHECKSUM 444e22ce8ca0f67353bda4b85175ed3731cae3ffa695ca18119cbacef1c1bea0
|
2020-07-05 11:09:18 -07:00
|
|
|
ENV ANDROID_BUILD_TOOLS_VERSION 29.0.3
|
|
|
|
ENV ANDROID_HOME /usr/local/android-sdk-linux
|
|
|
|
ENV ANDROID_VERSION 29
|
|
|
|
ENV PATH ${PATH}:${ANDROID_HOME}/tools:${ANDROID_HOME}/platform-tools
|
|
|
|
|
|
|
|
RUN mkdir "$ANDROID_HOME" .android && \
|
|
|
|
cd "$ANDROID_HOME" && \
|
|
|
|
curl -o sdk.zip $ANDROID_SDK_URL && \
|
2020-07-06 12:48:26 -07:00
|
|
|
echo "${ANDROID_SDK_CHECKSUM} sdk.zip" | sha256sum -c - && \
|
2020-07-05 11:09:18 -07:00
|
|
|
unzip sdk.zip && \
|
|
|
|
rm sdk.zip
|
|
|
|
|
|
|
|
RUN yes | ${ANDROID_HOME}/tools/bin/sdkmanager --licenses
|
|
|
|
RUN $ANDROID_HOME/tools/bin/sdkmanager --update
|
|
|
|
RUN $ANDROID_HOME/tools/bin/sdkmanager "build-tools;${ANDROID_BUILD_TOOLS_VERSION}" \
|
|
|
|
"platforms;android-${ANDROID_VERSION}" \
|
2020-08-29 13:33:23 -07:00
|
|
|
"platform-tools"
|
|
|
|
|
|
|
|
# install OS packages
|
|
|
|
RUN apt-get --quiet update --yes
|
|
|
|
|
|
|
|
# Installing build tools
|
|
|
|
RUN apt-get update && \
|
|
|
|
apt-get install -y \
|
|
|
|
build-essential \
|
|
|
|
ruby \
|
|
|
|
jq \
|
|
|
|
ruby-dev
|
|
|
|
|
|
|
|
# We use this for xxd hex->binary
|
|
|
|
RUN apt-get --quiet install --yes vim-common
|
|
|
|
|
|
|
|
# install FastLane
|
|
|
|
COPY Gemfile.lock .
|
|
|
|
COPY Gemfile .
|
|
|
|
RUN gem update --system 3.0.8 # https://github.com/rubygems/rubygems/issues/3068
|
|
|
|
RUN gem install bundler
|
|
|
|
RUN bundle install
|
|
|
|
|
|
|
|
# at least 1.5G memory is required for the gitlab runner to succeed
|
|
|
|
#RUN echo "org.gradle.jvmargs=-Xmx1536m" >> local.properties
|