Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Android][Docker]upgrade android sdk from 8 to 11 with java 11 support #37444

Merged
Show file tree
Hide file tree
Changes from all commits
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
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 @@
110 : [Tizen] Add zstd to base image
111 : [Android] Update android sdk and java version
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-17-jdk \
openjdk-11-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_HOME=/usr/lib/jvm/java-17-openjdk-amd64
ENV JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64
Original file line number Diff line number Diff line change
Expand Up @@ -16,26 +16,26 @@ RUN set -x \

# Download and install android SDK
RUN set -x \
&& wget -O /tmp/android-26.zip https://dl.google.com/android/repository/platform-26_r02.zip \
&& wget -O /tmp/android-30.zip https://dl.google.com/android/repository/platform-30_r03.zip \
&& mkdir -p /opt/android/sdk/platforms \
&& cd /opt/android/sdk/platforms \
&& unzip /tmp/android-26.zip \
&& mv android-8.0.0 android-26 \
&& rm -f /tmp/android-26.zip \
&& unzip /tmp/android-30.zip \
&& mv android-11 android-30 \
&& rm -f /tmp/android-30.zip \
&& chmod -R a+rX /opt/android/sdk \
&& test -d /opt/android/sdk/platforms/android-26 \
&& test -d /opt/android/sdk/platforms/android-30 \
&& : # 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
# We need create 10.0 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 \
&& wget -O /tmp/cmdline-tools.zip https://dl.google.com/android/repository/commandlinetools-linux-9862592_latest.zip \
&& cd /opt/android/sdk \
&& mkdir -p temp \
&& unzip /tmp/cmdline-tools.zip -d temp \
&& mkdir -p cmdline-tools/latest \
&& cp -rf temp/cmdline-tools/* cmdline-tools/latest \
&& mkdir -p cmdline-tools/10.0 \
&& cp -rf temp/cmdline-tools/* cmdline-tools/10.0 \
&& rm -rf temp \
&& test -d /opt/android/sdk/cmdline-tools \
&& : # last line
Expand Down
Loading