j11-to-j21
Overview
Step 1 — Upgrade JDK
JAVA_HOME = C:\Program Files\Java\jdk-21.x.x-hotspot
PATH = %JAVA_HOME%\bin;%PATH%
# Verify
java -version
# openjdk version "21.x.x"Step 2 — Upgrade Gradle and AGP
android/gradle/wrapper/gradle-wrapper.properties
android/build.gradle
Step 3 — Update compileSdkVersion and targetSdkVersion
Step 4 — Set Java 21 compileOptions in All Modules
Step 5 — Add Namespace to build.gradle (AGP 8.x Requirement)
AndroidManifest.xml — remove the package attribute
build.gradle — add the namespace
Auto-fallback for third-party Flutter plugins
Step 6 — Enable BuildConfig Generation (AGP 8.x)
Step 7 — Enable Core Library Desugaring (app module)
Step 8 — Upgrade BouncyCastle (keymanager)
keymanager/build.gradle
Update imports in LocalClientCryptoServiceImpl.java
Replace PEMWriter with JcaPEMWriter in CertificateManagerUtil.java
Step 9 — Remove jackson-module-afterburner (keymanager)
JsonUtils.java
Step 10 — Upgrade Jackson, Mockito, Lombok, Robolectric and Biomterics-utils
Step 11 — Add Jetifier Ignorelist
Step 12 — Add JVM Arguments for Test Modules
Step 13 — Fix Kotlin JVM Target Mismatch for Flutter Plugins
Step 14 — Disable Unit Tests for Broken Third-Party Flutter Plugins
Step 15 — Patch flutter_config Manifest (AGP 8.x)
Step 16 — Validate the Build
Migration Summary
Last updated
Was this helpful?