Dockerfile for building the Android app

The toolchain CI builds with (JDK 21, SDK platform 37, NDK 29, CMake
3.31.6, gawk for proot) on Ubuntu 24.04, plus the unit tests' host
compilers and SSH tools. `docker build --target apk --output out .`
gives the debug APK; the default target is an image to run Gradle in.
The submodules come from the checked-out tree (D-Modem-RE is private).
A proxy's CA can be given as a build secret, and HTTPS_PROXY is passed
on to Java.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
This commit is contained in:
Claude committed 2026-10-19 02:38:13 +00:00
1 parent 8078fd8f8a
commit 7e75fea461
5 files changed
+149

No files matched your search

+16
View File
@@ -0,0 +1,16 @@
# SPDX-License-Identifier: AGPL-3.0-only
# Copyright (C) 2026 Neo-Desktop
#
# Sourced by the Dockerfile's steps: an HTTPS_PROXY (Docker passes the
# usual proxy variables to a build) handed to Java as well, which doesn't
# read them (Gradle, sdkmanager).
p=${HTTPS_PROXY:-${https_proxy:-}}
if [ -n "$p" ]; then
hp=${p#*://}
hp=${hp#*@}
hp=${hp%%/*}
host=${hp%:*}
port=${hp##*:}
[ "$port" = "$hp" ] && port=443
export JAVA_TOOL_OPTIONS="${JAVA_TOOL_OPTIONS:-} -Dhttps.proxyHost=$host -Dhttps.proxyPort=$port -Dhttp.proxyHost=$host -Dhttp.proxyPort=$port -Dhttp.nonProxyHosts=localhost|127.*"
fi