Skip to content

chore(android): compileSdk 36 (target stays 35) - #739

Merged
islandbitcoin merged 1 commit into
mainfrom
chore/android-compilesdk-36
Sep 24, 2026
Merged

islandbitcoin merged 1 commit into
mainfrom
chore/android-compilesdk-36

Conversation

@islandbitcoin

Copy link
Copy Markdown
Contributor

Part 3 of ENG-605. Stacked on #733 (AGP 8.9.3 / Gradle 8.11.1) and #735 (native deps inherit rootProject.ext), which made this the planned two-line change.

What

android/build.gradle:

  • compileSdkVersion 35 → 36
  • buildToolsVersion 35.0.0 → 36.0.0

targetSdkVersion stays 35 (that is PR5). minSdkVersion unchanged.

Why

Compile against the API 36 headers now, so the edge-to-edge prep (PR4) and the eventual targetSdk 36 bump (PR5) can each be reviewed on their own. No runtime behaviour change: with targetSdk unchanged, Android still applies API 35 compatibility behaviour to the app.

Build proof (local, platforms;android-36 + build-tools;36.0.0)

Production bundle (npx react-native bundle --dev false …) followed by:

./android/gradlew -b ./android/build.gradle assembleRelease -PreactNativeArchitectures=arm64-v8a \
  -Dorg.gradle.jvmargs=-Xmx4g --warning-mode all  # debug-keystore -P overrides as in #733/#735
  • assembleRelease: BUILD SUCCESSFUL in 4m 18s, 2223 tasks executed. app-arm64-v8a-release.apk = 105,084,204 bytes (105,067,976 at compileSdk 35 in chore(android): libraries compile against API 36 (ENG-605 PR2) #735).
  • assembleDebug arm64 (device-test path): BUILD SUCCESSFUL in 2m 32s. app-arm64-v8a-debug.apk = 140,939,483 bytes.
  • All 8 libraries that report a compileSdk log android.compileSdk using custom value: 36 (firebase app / app-check / …); none report 35 any more.
  • yarn tsc:check clean; yarn test: 1161 passed, 1161 total.

Warnings

  • No AGP "unsupported compileSdk" warning — AGP 8.9.3 supports 36 natively, so android.suppressUnsupportedCompileSdk was not added to gradle.properties.
  • Every warning in the release log is a pre-existing library-source deprecation against RN 0.77 APIs (onCatalystInstanceDestroy, TurboReactPackage, the codegen $-in-identifier C++ warnings) or the Gradle 9 deprecations already reported in chore(android): AGP 8.9 + Gradle 8.11 ahead of the API 36 bump (ENG-605) #733 (jcenter(), custom build-file location). None mention API 36.
  • Debug build only: 32 D8: Invalid stack map table warnings from play-services-auth-21.5.0-runtime.jar. These come from that jar's own bytecode, not from the SDK level; the release path (R8) does not emit them. Not re-verified against a compileSdk 35 debug build.

CI

build-check.yml and android-deploy.yml are unchanged: both install only platform-tools via setup-android and let Gradle fetch the pinned platform and build-tools (licences accepted by the action), exactly as they fetched android-35. gradle.properties.example (which CI copies over) needs no new entry.

Not verified here

  • No device run (compile-time-only change, no runtime delta expected).
  • iOS untouched.

Next: PR4, edge-to-edge prep ahead of targetSdk 36.

🤖 Generated with Claude Code

ENG-605 PR3. Stacked on #733 (AGP 8.9.3 / Gradle 8.11.1) and #735
(every native dependency now inherits rootProject.ext), so this is the
two-line bump those prepared for:

- compileSdkVersion 35 -> 36
- buildToolsVersion 35.0.0 -> 36.0.0

targetSdkVersion stays at 35 (PR5), minSdkVersion unchanged, so there is
no runtime behaviour change: the app is compiled against the API 36
headers but Android still applies API 35 compatibility behaviour.

AGP 8.9.3 supports compileSdk 36 natively; no
android.suppressUnsupportedCompileSdk entry was needed in
gradle.properties. CI is unchanged: both Android workflows install only
platform-tools and let Gradle fetch the pinned platform/build-tools.

Verified locally (platforms;android-36 + build-tools;36.0.0):
assembleRelease and assembleDebug (arm64-v8a) BUILD SUCCESSFUL, all 8
libraries that print a compileSdk report "using custom value: 36";
yarn tsc:check clean; yarn test 1161 passed.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
@islandbitcoin
islandbitcoin merged commit 2403ba3 into main Sep 24, 2026
9 checks passed
@islandbitcoin islandbitcoin mentioned this pull request Sep 24, 2026
26 tasks
islandbitcoin pushed a commit that referenced this pull request Sep 24, 2026
ENG-605 PR5. targetSdkVersion 35 -> 36 in android/build.gradle;
compileSdk/buildTools were already 36 (#739), minSdk 26 unchanged.

Sets android:enableOnBackInvokedCallback="false" on <application>.
Android 16 enables predictive back for apps targeting 36 and stops
calling Activity.onBackPressed(); RN 0.77.1's ReactActivity only
overrides onBackPressed() (the OnBackPressedCallback registration
landed in RN 0.80), and that override is the only path that emits the
JS hardwareBackPress event. This app is on @react-navigation/stack
(JS stack) and react-native-modal's onBackButtonPress, both driven by
that event, so without the opt-out a back press on an Android 16
device would leave the app from any screen. Remove the attribute when
RN is bumped to 0.80+.

Everything else in the Android 16 audit (edge-to-edge + adjustResize,
screenOrientation on large screens, StatusBar backgroundColor no-ops,
FGS/exact-alarm/NFC permissions, 16 KB packaging from #622) is a
documented no-change; see the PR body.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
islandbitcoin added a commit that referenced this pull request Sep 24, 2026
ENG-605 PR5. targetSdkVersion 35 -> 36 in android/build.gradle;
compileSdk/buildTools were already 36 (#739), minSdk 26 unchanged.

Sets android:enableOnBackInvokedCallback="false" on <application>.
Android 16 enables predictive back for apps targeting 36 and stops
calling Activity.onBackPressed(); RN 0.77.1's ReactActivity only
overrides onBackPressed() (the OnBackPressedCallback registration
landed in RN 0.80), and that override is the only path that emits the
JS hardwareBackPress event. This app is on @react-navigation/stack
(JS stack) and react-native-modal's onBackButtonPress, both driven by
that event, so without the opt-out a back press on an Android 16
device would leave the app from any screen. Remove the attribute when
RN is bumped to 0.80+.

Everything else in the Android 16 audit (edge-to-edge + adjustResize,
screenOrientation on large screens, StatusBar backgroundColor no-ops,
FGS/exact-alarm/NFC permissions, 16 KB packaging from #622) is a
documented no-change; see the PR body.

Co-authored-by: Dread <[email protected]>
Co-authored-by: Claude Fable 5.1 <[email protected]>
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