Based on http://openjdk.java.net/projects/mobile/android.html
| Target version | Architectures | Minimum API level | NDK | State |
|---|---|---|---|---|
| 25 | aarch64, aarch32, x86_64 | 30 (Android 11) | r29 (29.0.14206865) | CI verified for aarch64 |
| 17 | aarch32, aarch64, x86, x86_64 | 30 (Android 11) | r29 (29.0.14206865) | scripts/patches kept, not re-verified after the NDK/API bump |
| 21 | aarch32, aarch64, x86, x86_64 | 30 (Android 11) | r29 (29.0.14206865) | scripts/patches kept, not re-verified after the NDK/API bump |
JDK 25 does not support 32-bit x86: openjdk/jdk25u removed that port upstream,
so 1_ci_build_arch_x86.sh refuses to run with TARGET_VERSION=25.
On 32-bit ARM, g1gc is disabled for JDK 25 (it dies with SIGILL since JDK 24).
The CI workflow builds JDK 25 only, one architecture per manual run.
17 and 21 keep their patch sets and can be added back to the workflow's version
list, but note that the switch to NDK r29/API 30 was only validated for JDK 25:
17/21 were last built against NDK r27b and would also need the _fini/_init
version script fix that patches/jre_25 carries.
- Download Android NDK r29 (29.0.14206865) from https://developer.android.com/ndk/downloads and place it in this directory (Can't automatically download because of EULA)
- It is also found with
ANDROID_NDK_HOMEor<android-sdk>/ndk/29.0.14206865if the NDK was installed through the Android SDK manager. - The CI workflow downloads the standalone NDK r29 zip automatically.
- Whichever NDK is picked, its
source.propertiesmust reportPkg.Revision = 29.0.14206865. Any other revision is rejected (setSKIP_NDK_VERSION_CHECK=1to override), and the revision is re-verified after the CI download.
- It is also found with
- A boot JDK matching the target version (17, 21 or 25) must be the active JDK.
- You should get latest Xcode (tested with Xcode 12).
| Environment variables | |||||||
|---|---|---|---|---|---|---|---|
| Platform - Architecture | TARGET | TARGET_JDK | |||||
| Android - armv8/aarch64 | aarch64-linux-android | aarch64 | |||||
| Android - armv7/aarch32 | arm-linux-androideabi | arm | |||||
| Android - x86/i686 (17/21 only) | i686-linux-android | x86 | |||||
| Android - x86_64/amd64 | x86_64-linux-android | x86_64 | |||||
| iOS/iPadOS - armv8/aarch64 | aarch64-macos-ios | aarch64 | |||||
export TARGET_VERSION=[17/21/25] # default: 25
export BUILD_IOS=1 # only when targeting iOS, default is 0 (target Android)
export BUILD_FREETYPE_VERSION=[2.6.2/.../2.10.4] # default: 2.10.0
export JDK_DEBUG_LEVEL=[release/fastdebug/debug] # default: release
export JVM_VARIANTS=[client/server] # default: client (aarch32), server (other architectures)
# Get CUPS, Freetype and build Freetype
./3_getlibs.sh
./4_buildlibs.sh
# Clone JDK, run once
./5_clonejdk.sh
# Configure JDK and build, if no configuration is changed, run makejdkwithoutconfigure.sh instead
./6_buildjdk.sh
# Pack the built JDK
./7_removejdkdebuginfo.sh
./8_tarjdk.sh
The arch-specific CI entry points wrap all of that for a single architecture, e.g.
export TARGET_VERSION=25 && bash 1_ci_build_arch_aarch64.sh.
patches/jre_<version>/android holds the Android patch set for each supported JDK
(jre_17, jre_21, jre_25). It is applied with git apply --reject --whitespace=fix,
so every hunk has to apply cleanly.