feat(client/android): upgrade to cordova-android 15 and target api 36 - #2828
Draft
ohnorobo wants to merge 3 commits into
Draft
feat(client/android): upgrade to cordova-android 15 and target api 36#2828ohnorobo wants to merge 3 commits into
ohnorobo wants to merge 3 commits into
Conversation
Google Play requires apps to target API 36 for updates after Aug 31, 2026. cordova-android 15.1.0 defaults to compileSdk/targetSdk 36 and ships AGP 8.10.1 / Gradle 8.14.2, so bumping it is the prerequisite for the API 36 move. - cordova-android ^14.0.0 -> ^15.1.0 (node >=22.9, we build on 22) - config.xml android-targetSdkVersion 35 -> 36 - OutlineAndroidLib compileSdk/targetSdk 35 -> 36 - AGP 8.7.3 -> 8.10.1 (kept in sync with cordova-android's AGP_VERSION for the --include-build composite) and the lib Gradle wrapper 8.13 -> 8.14.2 to match - gomobile ANDROID_API and lib minSdk raised to 29 to align with the app's minSdk (config.xml already 29) - README SDK packages, prose and version table updated to 36 / AGP 8.10.1 / Gradle 8.14.2 Stays on JDK 17: cordova-android 15's Java compatibility is 11 and AGP 8.10 runs on JDK 17, so the JDK-21 bump proposed in #2808 is unneeded. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…oid 15
cordova-android 15 generates cdv_strings.xml from config.xml's <name>,
defining app_name/launcher_name/activity_name in the base res/values.
Our plugin also shipped those three in res/values/strings.xml, which
made :app:mergeReleaseResources fail with "Duplicate resources" on the
release build (cordova-android 14 did not generate cdv_strings.xml).
Remove the three cordova-managed, non-translated keys from the base file
so cdv_strings.xml owns them. The localized values-*/strings.xml keep
their (identical-value) copies -- harmless per-locale overrides -- to
avoid churning 60+ files.
Verified: a throwaway-keystore release build now completes through
app R8, bundletool 1.18.3 universal APK, and the new 16KB zipalign
check ("Verification successful").
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…idLib
connected_server_state / reconnecting_server_state (read by VpnTunnelService
via getIdentifier) lived in the Cordova plugin's res/ and were copied into the
app. They belong with their only consumer, so move them -- and their ~65
translations -- into OutlineAndroidLib's own res/, whose resources merge into
the app the same way.
This lets the plugin's res/values/strings.xml and every res/values-<lang>/
strings.xml be deleted (66 files). Along the way it drops:
- app_name / launcher_name / activity_name: unused in code and now generated
by cordova-android 15 into cdv_strings.xml from config.xml's <name>.
- server_default_name_outline: a dead Android string resource (native code
never reads it; the web app keeps its own copy in original_messages.json).
res/values/bypass_subnets.xml and the drawables stay in the plugin.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stack 1 of 2 — base of the Android release-modernization stack. The 16KB-alignment + R8/dependency-hygiene work is stacked on top in a follow-up PR.
Google Play requires apps to target API 36 for updates after Aug 31, 2026. cordova-android 15.1.0 defaults to compileSdk/targetSdk 36 and ships AGP 8.10.1 / Gradle 8.14.2, so this bump is the prerequisite for the API 36 move.
Changes
cordova-android^14.0.0→^15.1.0(node ≥22.9; lockfile regenerated)config.xmltargetSdk 35 → 36;OutlineAndroidLibcompileSdk/targetSdk 35 → 36AGP_VERSIONfor the--include-buildcomposite); lib Gradle wrapper 8.13 → 8.14.2ANDROID_API26→29; app already 29)cdv_strings.xmlfrom<name>, which collided withapp_name/launcher_name/activity_namein our plugin'sstrings.xml→:app:mergeReleaseResourcesfailed. Those three cordova-managed, non-translated keys are dropped. Without this the app does not build under cordova 15.connected_server_state/reconnecting_server_state(VPN notification text, read byVpnTunnelService) and their ~65 translations — into OutlineAndroidLib's ownres/, where their sole consumer lives and whose resources merge into the app identically. This lets the plugin'sres/values/strings.xmland everyres/values-<lang>/strings.xmlbe deleted (66 files); the deadserver_default_name_outlineAndroid resource is dropped too (native code never read it — the web app keeps its own copy inoriginal_messages.json).res/values/bypass_subnets.xmland the drawables stay. Verified: the full stacked release build keeps both strings (and their translations) through R8 +shrinkResources.Stays on JDK 17 — cordova-android 15's Java compat is 11 and AGP 8.10 runs on JDK 17, so the JDK-21 bump proposed in #2808 is unneeded. Coordinate with @ohnorobo: rework #2808 into this or supersede.
Testing
systemExemptedforeground-service ran fine under API 36's stricter FGS rules.🤖 Generated with Claude Code