Skip to content
Closed
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
19 changes: 13 additions & 6 deletions scripts/azure-pipelines/android/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
FROM ubuntu:noble-20250127

ADD https://packages.microsoft.com/config/ubuntu/24.04/packages-microsoft-prod.deb /packages-microsoft-prod.deb
ADD https://builds.openlogic.com/downloadJDK/openlogic-openjdk/11.0.25+9/openlogic-openjdk-11.0.25+9-linux-x64.tar.gz /openlogic-openjdk-11.0.25+9-linux-x64.tar.gz
ADD https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.14+7/OpenJDK17U-jdk_x64_linux_hotspot_17.0.14_7.tar.gz /OpenJDK17U-jdk_x64_linux_hotspot_17.0.14_7.tar.gz
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ADD https://dl.google.com/android/repository/commandlinetools-linux-10406996_latest.zip /sdk-commandlinetools-linux-10406996_latest.zip
ADD https://dl.google.com/android/repository/build-tools_r34-linux.zip /build-tools_r34-linux.zip
ADD https://dl.google.com/android/repository/platform-34-ext7_r03.zip /platform-34-ext7_r03.zip
Expand Down Expand Up @@ -45,6 +45,8 @@ ENV APT_PACKAGES="$APT_PACKAGES libxext-dev libxfixes-dev libxrender-dev \
ENV APT_PACKAGES="$APT_PACKAGES powershell"

RUN <<END_OF_SCRIPT bash
set -e

export DEBIAN_FRONTEND=noninteractive

# Apt prereqs itself
Expand All @@ -56,7 +58,6 @@ apt-get -y --no-install-recommends install ca-certificates
## PowerShell
dpkg -i packages-microsoft-prod.deb
rm -f packages-microsoft-prod.deb
add-apt-repository universe
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Discovered by set -e.


# Run apt things
apt-get -y update
Expand All @@ -65,8 +66,8 @@ apt-get -y dist-upgrade
apt-get -y --no-install-recommends install $APT_PACKAGES

# OpenJDK
tar xzf openlogic-openjdk-11.0.25+9-linux-x64.tar.gz
rm openlogic-openjdk-11.0.25+9-linux-x64.tar.gz
tar xzf OpenJDK17U-jdk_x64_linux_hotspot_17.0.14_7.tar.gz
rm OpenJDK17U-jdk_x64_linux_hotspot_17.0.14_7.tar.gz

# Android SDK
unzip -q sdk-commandlinetools-linux-10406996_latest.zip -d android-sdk
Expand All @@ -78,17 +79,23 @@ rm build-tools_r34-linux.zip

unzip -q platform-34-ext7_r03.zip -d android-sdk/platforms
rm platform-34-ext7_r03.zip
find android-sdk/platforms -type d -exec chmod o+rx '{}' ';'
find android-sdk/platforms -type f -exec chmod o+r '{}' ';'
Comment on lines +82 to +83
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unzip creating rwxrwx--- 🤦


unzip -q platform-tools_r35.0.1-linux.zip -d android-sdk
rm platform-tools_r35.0.1-linux.zip

# JRE for sdk setup
export JAVA_HOME=/jdk-17.0.14+7
yes | /android-sdk/cmdline-tools/bin/sdkmanager --sdk_root=/android-sdk --licenses

# Android NDK
unzip /android-ndk-r27c-linux.zip
unzip -q /android-ndk-r27c-linux.zip
rm -f android-ndk-r27c-linux.zip

END_OF_SCRIPT

ENV JAVA_HOME /openlogic-openjdk-11.0.25+9-linux-x64
ENV JAVA_HOME /jdk-17.0.14+7

ENV ANDROID_HOME /android-sdk

Expand Down