Skip to content

fix(mobile): replace abandoned react-native-navigation-bar-color - #790

Open
ZeLonewolf wants to merge 1 commit into
coinbase:masterfrom
ZeLonewolf:fix/replace-navigation-bar-color
Open

ZeLonewolf wants to merge 1 commit into
coinbase:masterfrom
ZeLonewolf:fix/replace-navigation-bar-color

Conversation

@ZeLonewolf

@ZeLonewolf ZeLonewolf commented Jul 12, 2026

Copy link
Copy Markdown

Summary

Fixes #789.

@coinbase/cds-mobile depends on react-native-navigation-bar-color (peer + dev, plus the expo example app and template). That library is unmaintained — last commit and last npm release were December 2022 — and its android/build.gradle still calls jcenter(), which Gradle 9 removed. As a result, any consumer on React Native 0.82+ / Expo SDK 55+ fails the Android build during Gradle configuration with Could not find method jcenter().

cds-mobile only used a single call (changeNavigationBarColor(hex, light, animated)), so this swaps it for the maintained react-native-system-navigation-bar (last released Dec 2025, supports current RN).

Changes

  • packages/mobile/src/system/AndroidNavigationBar.tsx: use SystemNavigationBar.setNavigationColor(hex, style, 'navigation').
  • packages/mobile/package.json: swap the peer + dev dependency to react-native-system-navigation-bar.
  • apps/expo-app/package.json, templates/expo-app/package.json: swap the dependency.
  • Root package.json + .yarn/patches/…: remove the old yarn patch (it only promisified the return value and did not address the jcenter() break).
  • yarn.lock: regenerated.

Notes

This complements the RN 0.83 peer-range work in #763 — removing this dead dependency is part of building cds-mobile cleanly on modern React Native.

Made with Cursor

react-native-navigation-bar-color is unmaintained (last release Dec
2022) and its android/build.gradle still calls jcenter(), which Gradle 9
removed. Any consumer on React Native 0.82+ / Expo SDK 55+ therefore
fails the Android build during Gradle configuration. cds-mobile only
used the single changeNavigationBarColor() call.

Swap it for the maintained react-native-system-navigation-bar across
cds-mobile, the expo example app, and the template, and drop the local
yarn patch (which only promisified the old package and did not fix the
jcenter issue).

Closes coinbase#789

Co-authored-by: Cursor <cursoragent@cursor.com>
@cb-heimdall

Copy link
Copy Markdown
Collaborator

🟡 Heimdall Review Status

Requirement Status More Info
Reviews 🟡 0/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 1
Global minimum 0
Max 1
1
1 if commit is unverified 1
Sum 2
CODEOWNERS 🟡 See below

🟡 CODEOWNERS

Code Owner Status Calculation
ui-systems-eng-team 🟡 0/1
Denominator calculation
Additional CODEOWNERS Requirement
Show calculation
Sum 0
0
From CODEOWNERS 1
Sum 1

@ZeLonewolf
ZeLonewolf marked this pull request as ready for review July 13, 2026 00:03

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

cds-mobile's react-native-navigation-bar-color peer dep breaks Android builds on Gradle 9

2 participants