Skip to content

Feat/namespace - #209

Open
ngocle2497 wants to merge 5 commits into
callstack:masterfrom
ngocle2497:feat/namespace
Open

ngocle2497 wants to merge 5 commits into
callstack:masterfrom
ngocle2497:feat/namespace

Conversation

@ngocle2497

Copy link
Copy Markdown
Contributor

Overview

On Prev-PR, we used script to change AndroidManifest content.
Now we create new AndroidManifest file, then use this when android support namespace

Test Plan

@TantiE100

Copy link
Copy Markdown

A concrete case where the build-time manifest rewrite this PR removes causes trouble, in case it helps to get it merged.

android/build.gradle rewrites src/main/AndroidManifest.xml inside node_modules on every Gradle configuration (with AGP 7+ it strips package=). @react-native-masked-view/masked-view 0.3.2 is a dependency of expo-router, and Expo's fingerprint (runtimeVersion: { policy: 'fingerprint' }) hashes that file. So any local expo run:android changes the project fingerprint: the local runtime stops matching the one on EAS and on the store build, and OTA updates published from that checkout target a runtime no installed build has. We hit it twice before tracking it down; the workaround was npm ci before every fingerprint check.

We now ship the same idea as this PR as a local patch on 0.3.2: the manifest without package= (what the script left anyway on AGP 8) and namespace declared unconditionally, since React Native 0.73+ requires AGP 8. The merged manifest is identical, and building no longer modifies node_modules.

Would be great to see this (or just dropping the rewrite for AGP ≥ 7.3) in a release.

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.

2 participants