Browse Source

Add Android SDK to the gradle-plugin-tests Dockerfile

andrei.salavei/accessibility-lib
Konstantin Tskhovrebov 12 months ago
parent
commit
b039a91003
  1. 23
      ci/docker/gradle-plugin-tests/Dockerfile

23
ci/docker/gradle-plugin-tests/Dockerfile

@ -6,6 +6,25 @@ RUN apt-get update -y && \
apt-get install fakeroot --no-install-recommends -y && \ apt-get install fakeroot --no-install-recommends -y && \
apt-get install dpkg --no-install-recommends -y && \ apt-get install dpkg --no-install-recommends -y && \
apt-get install dpkg-dev --no-install-recommends -y && \ apt-get install dpkg-dev --no-install-recommends -y && \
apt-get install libgl-dev --no-install-recommends -y apt-get install libgl-dev --no-install-recommends -y && \
apt-get install curl --no-install-recommends -y && \
apt-get install unzip --no-install-recommends -y && \
apt-get install openjdk-17-jdk --no-install-recommends -y
ENV ANDROID_HOME=/android/sdk
ARG ANDROID_PLATFORM=android-33
ARG CMD_TOOLS_VERSION=9123335
ARG CMD_TOOLS_ROOT=$ANDROID_HOME/cmdline-tools/$CMD_TOOLS_VERSION
ARG SDK_MANAGER=$CMD_TOOLS_ROOT/bin/sdkmanager
RUN mkdir -p $CMD_TOOLS_ROOT && \
curl -o cmd-tools.zip "https://dl.google.com/android/repository/commandlinetools-linux-${CMD_TOOLS_VERSION}_latest.zip" && \
unzip cmd-tools.zip && \
rm cmd-tools.zip && \
mv cmdline-tools/* $CMD_TOOLS_ROOT/ && \
yes | $SDK_MANAGER --licenses && \
$SDK_MANAGER "platforms;$ANDROID_PLATFORM" && \
cd $ANDROID_HOME/platforms/$ANDROID_PLATFORM && \
ls -1 | grep -v android.jar | xargs rm -rf
ENV PATH="/usr/lib/x86_64-linux-gnu/:$PATH" ENV PATH="/usr/lib/x86_64-linux-gnu/:$PATH"
RUN apt-get install openjdk-17-jdk --no-install-recommends -y

Loading…
Cancel
Save