FN-7209: require JDK 21 for Android CI builds
Align Android Gradle build environments with Capacitor's Java 21 source compatibility. - Update mobile, release, and test-release workflows to provision Temurin JDK 21. - Document Java 21 as the required Android Gradle build JDK. - Add CI workflow coverage that checks Android build jobs satisfy @capacitor/android sourceCompatibility. Files changed: .github/workflows/mobile.yml | 6 +- .github/workflows/release.yml | 6 +- .github/workflows/test-release.yml | 6 +- MOBILE.md | 4 +- packages/cli/src/__tests__/ci-workflow.test.ts | 99 +++++++++++++++++++++++++- 5 files changed, 112 insertions(+), 9 deletions(-) Fusion-Task-Id: FN-7209 Fusion-Task-Lineage: d9e50bee-d7f8-4e87-b33e-136ffffc93af Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
This commit is contained in:
6
.github/workflows/mobile.yml
vendored
6
.github/workflows/mobile.yml
vendored
@@ -111,11 +111,13 @@ jobs:
|
||||
- name: Setup Node and install dependencies
|
||||
uses: ./.github/actions/setup-node-pnpm
|
||||
|
||||
- name: Setup Java 17
|
||||
# FNXC:MobileAndroidBuild 2026-06-28-00:00:
|
||||
# Capacitor 7 @capacitor/android compiles its Android library with JavaVersion.VERSION_21; manual Android Gradle builds must provision JDK 21 because JDK 17 fails with `invalid source release: 21`.
|
||||
- name: Setup Java 21
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: "17"
|
||||
java-version: "21"
|
||||
|
||||
- name: Cache Android Gradle caches
|
||||
uses: actions/cache@v4
|
||||
|
||||
6
.github/workflows/release.yml
vendored
6
.github/workflows/release.yml
vendored
@@ -389,11 +389,13 @@ jobs:
|
||||
- name: Setup Node and install dependencies
|
||||
uses: ./.github/actions/setup-node-pnpm
|
||||
|
||||
- name: Setup Java 17
|
||||
# FNXC:MobileAndroidBuild 2026-06-28-00:00:
|
||||
# Capacitor 7 @capacitor/android compiles its Android library with JavaVersion.VERSION_21; release APK/AAB Gradle builds must provision JDK 21 because JDK 17 fails with `invalid source release: 21`.
|
||||
- name: Setup Java 21
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: "17"
|
||||
java-version: "21"
|
||||
|
||||
- name: Cache Android Gradle caches
|
||||
uses: actions/cache@v4
|
||||
|
||||
6
.github/workflows/test-release.yml
vendored
6
.github/workflows/test-release.yml
vendored
@@ -375,11 +375,13 @@ jobs:
|
||||
- name: Setup Node and install dependencies
|
||||
uses: ./.github/actions/setup-node-pnpm
|
||||
|
||||
- name: Setup Java 17
|
||||
# FNXC:MobileAndroidBuild 2026-06-28-00:00:
|
||||
# Capacitor 7 @capacitor/android compiles its Android library with JavaVersion.VERSION_21; rehearsal APK/AAB Gradle builds must provision JDK 21 because JDK 17 fails with `invalid source release: 21`.
|
||||
- name: Setup Java 21
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: "17"
|
||||
java-version: "21"
|
||||
|
||||
- name: Cache Android Gradle caches
|
||||
uses: actions/cache@v4
|
||||
|
||||
Reference in New Issue
Block a user