Skip to content

feat(client/android): upgrade to cordova-android 15 and target api 36 - #2828

Draft
ohnorobo wants to merge 3 commits into
masterfrom
feat/android-api36
Draft

feat(client/android): upgrade to cordova-android 15 and target api 36#2828
ohnorobo wants to merge 3 commits into
masterfrom
feat/android-api36

Conversation

@ohnorobo

@ohnorobo ohnorobo commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

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.xml targetSdk 35 → 36; OutlineAndroidLib compileSdk/targetSdk 35 → 36
  • AGP 8.7.3 → 8.10.1 (kept in sync with cordova's AGP_VERSION for the --include-build composite); lib Gradle wrapper 8.13 → 8.14.2
  • minSdk tidied to 29 everywhere (lib 24→29, gomobile ANDROID_API 26→29; app already 29)
  • README SDK packages / prose / version table
  • Duplicate-resource fix: cordova-android 15 generates cdv_strings.xml from <name>, which collided with app_name/launcher_name/activity_name in our plugin's strings.xml:app:mergeReleaseResources failed. Those three cordova-managed, non-translated keys are dropped. Without this the app does not build under cordova 15.
  • Notification strings relocated: moved the only live plugin strings — connected_server_state / reconnecting_server_state (VPN notification text, read by VpnTunnelService) and their ~65 translations — into OutlineAndroidLib's own res/, where their sole consumer lives and whose resources merge into the app identically. This lets the plugin's res/values/strings.xml and every res/values-<lang>/strings.xml be deleted (66 files); the dead server_default_name_outline Android resource is dropped too (native code never read it — the web app keeps its own copy in original_messages.json). res/values/bypass_subnets.xml and 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

  • On-device soak of the full stacked build on a physical Pixel 6a (Android 16): the app builds, installs, and runs on targetSdk 36 — VPN connect / disconnect / reconnect and the Quick Settings tile all work, with no crashes or reflection failures in logcat. The systemExempted foreground-service ran fine under API 36's stricter FGS rules.
  • Release build (this + the stacked PR) builds through to a signed AAB with cordova-android 15.1.0.

🤖 Generated with Claude Code

ohnorobo and others added 2 commits July 29, 2026 16:16
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant