This repository was archived by the owner on Apr 26, 2026. It is now read-only.
Commit e3e3816
fix(android): add CMake task dependency to prevent race condition (#3165)
## Summary
- Add `afterEvaluate` block in `android/build.gradle` to ensure
`buildCMake*` tasks depend on `react-native-nitro-modules`'
corresponding CMake tasks
- Prevents intermittent linker error where `libNitroModules.so` is not
yet built when IAP's CMake runs
## Context
When building with Gradle parallel execution, IAP's
`buildCMakeDebug[arm64-v8a]` can run before `react-native-nitro-modules`
finishes producing `libNitroModules.so`, causing a linker failure. This
was a latent race condition that became more visible after the
nitro-modules 0.35.0 upgrade (JNI initialization pattern change).
Investigated upstream nitro 0.35.0 — no CMake/Gradle build order changes
were made, confirming this is a pre-existing issue.
Closes #3163
## Test plan
- [x] Android build succeeds with `--parallel` flag
- [x] No regression on iOS build (android-only change, no iOS impact)
🤖 Generated with [Claude Code](https://claude.ai/code)
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>1 parent 5591ae8 commit e3e3816
1 file changed
Lines changed: 17 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
204 | 204 | | |
205 | 205 | | |
206 | 206 | | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
0 commit comments