summaryrefslogtreecommitdiff
path: root/Dockerfile
diff options
context:
space:
mode:
authorElizabeth Alexander Hunt <me@liz.coffee>2026-11-13 16:40:02 -0800
committerElizabeth Alexander Hunt <me@liz.coffee>2026-11-13 16:40:02 -0800
commit3803f14160c30ac470bc957f8a0f2dbe67c4fd57 (patch)
treeb7cfc3e0570ef7766e053b89ca038109c353d359 /Dockerfile
parent8974b115b69bc25ebf174e8c9637373c4d206325 (diff)
downloadrookery-release.tar.gz
rookery-release.zip
Added full buildsHEADreleasemain
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile11
1 files changed, 8 insertions, 3 deletions
diff --git a/Dockerfile b/Dockerfile
index 84e02b2..de3b34d 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -3,10 +3,14 @@ FROM eclipse-temurin:21-jdk AS build
WORKDIR /src
# Android SDK: core and ui have Android targets, so Gradle needs one even for the desktop build.
ENV ANDROID_HOME=/opt/android-sdk
-RUN apt-get update && apt-get install -y --no-install-recommends unzip curl && rm -rf /var/lib/apt/lists/* \
+RUN apt-get update && apt-get install -y --no-install-recommends unzip zip curl && rm -rf /var/lib/apt/lists/* \
&& mkdir -p $ANDROID_HOME/cmdline-tools && curl -fsSL -o /tmp/clt.zip https://dl.google.com/android/repository/commandlinetools-linux-13114758_latest.zip \
&& unzip -q /tmp/clt.zip -d $ANDROID_HOME/cmdline-tools && mv $ANDROID_HOME/cmdline-tools/cmdline-tools $ANDROID_HOME/cmdline-tools/latest && rm /tmp/clt.zip \
&& yes | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --licenses > /dev/null
+# macOS Java runtimes can be linked on Linux from a macOS JDK's jmods, so keep just those (about 40 MB each).
+RUN for a in aarch64 x64; do mkdir -p /opt/macjdk/$a \
+ && curl -fsSL "https://api.adoptium.net/v3/binary/latest/21/ga/mac/$a/jdk/hotspot/normal/eclipse" \
+ | tar -xz -C /opt/macjdk/$a --strip-components=1 --wildcards '*/Contents/Home/jmods'; done
# Warm the Gradle wrapper and dependency cache before copying sources.
COPY gradlew settings.gradle.kts build.gradle.kts gradle.properties ./
COPY gradle gradle
@@ -16,8 +20,9 @@ COPY desktop/build.gradle.kts desktop/
COPY android/build.gradle.kts android/
RUN ./gradlew --no-daemon -q help
COPY . .
-# Tests, then every download: the Linux app (with its runtime), the universal jar and the Android APK.
-RUN ./gradlew --no-daemon :core:jvmTest :desktop:createDistributable :desktop:universalJar :android:assembleDebug
+# Tests, then every download: the Linux app (with its runtime), the universal jar and the release APK.
+RUN ./gradlew --no-daemon :core:jvmTest :desktop:createDistributable :desktop:universalJar :android:assembleRelease
+RUN sh site/macos-app.sh 0.1.0
# The commit goes in last, so a new commit doesn't redo the build above's cache-able layers.
ARG COMMIT=unknown
RUN sh site/assemble.sh /site "$COMMIT"