Skip to content

Commit

Permalink
Fix android docker image (project-chip#37348)
Browse files Browse the repository at this point in the history
  • Loading branch information
yunhanw-google authored Feb 3, 2025
1 parent 95d5de5 commit 11a4c4a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion integrations/docker/images/base/chip-build/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
105 : Upgrade android docker with new kotlin/gradle
106 : Upgrade android docker with java 17 and adjust the location for android cmdline tool
4 changes: 2 additions & 2 deletions integrations/docker/images/stage-2/chip-build-java/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ LABEL org.opencontainers.image.source https://github.com/project-chip/connectedh
RUN set -x \
&& apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -fy \
openjdk-11-jdk \
openjdk-17-jdk \
&& rm -rf /var/lib/apt/lists/ \
&& : # last line

Expand All @@ -20,4 +20,4 @@ RUN set -x \
&& : # last line

ENV PATH $PATH:/usr/lib/kotlinc/bin
ENV JAVA_PATH=/usr/lib/jvm/java-11-openjdk-amd64
ENV JAVA_PATH=/usr/lib/jvm/java-17-openjdk-amd64
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,16 @@ RUN set -x \
&& : # last line

# Download and install android command line tool (for installing `sdkmanager`)
# We need create latest folder inide cmdline-tools, since latest android commandline tool looks for this latest folder
# when running sdkmanager --licenses
RUN set -x \
&& wget -O /tmp/cmdline-tools.zip https://dl.google.com/android/repository/commandlinetools-linux-11076708_latest.zip \
&& cd /opt/android/sdk \
&& unzip /tmp/cmdline-tools.zip \
&& rm -f /tmp/cmdline-tools.zip \
&& mkdir -p temp \
&& unzip /tmp/cmdline-tools.zip -d temp \
&& mkdir -p cmdline-tools/latest \
&& cp -rf temp/cmdline-tools/* cmdline-tools/latest \
&& rm -rf temp \
&& test -d /opt/android/sdk/cmdline-tools \
&& : # last line

Expand Down

0 comments on commit 11a4c4a

Please sign in to comment.