# Build image for mygram-droid: JDK 17, Android SDK 34, Gradle. # Used by build.sh; nothing is installed on the host. # # Copyright (C) 2026 Danilo M. # Licensed under the GNU General Public License version 2 only. FROM eclipse-temurin:17-jdk-jammy ENV ANDROID_HOME=/opt/android-sdk \ GRADLE_VERSION=8.7 ENV PATH=$PATH:$ANDROID_HOME/cmdline-tools/latest/bin:/opt/gradle-$GRADLE_VERSION/bin RUN apt-get update && apt-get install -y --no-install-recommends unzip curl \ && rm -rf /var/lib/apt/lists/* \ && curl -fsSL -o /tmp/tools.zip https://dl.google.com/android/repository/commandlinetools-linux-11076708_latest.zip \ && mkdir -p $ANDROID_HOME/cmdline-tools \ && unzip -q /tmp/tools.zip -d $ANDROID_HOME/cmdline-tools \ && mv $ANDROID_HOME/cmdline-tools/cmdline-tools $ANDROID_HOME/cmdline-tools/latest \ && curl -fsSL -o /tmp/gradle.zip https://services.gradle.org/distributions/gradle-$GRADLE_VERSION-bin.zip \ && unzip -q /tmp/gradle.zip -d /opt \ && rm /tmp/*.zip \ && yes | sdkmanager --licenses >/dev/null \ && sdkmanager "platforms;android-34" "build-tools;34.0.0" "platform-tools" >/dev/null