Add RNRepo to ci builds#4141
Conversation
There was a problem hiding this comment.
Pull request overview
Adds RNRepo prebuilt native dependency support to the apps/basic-example CI build path so the example app can reuse prebuilt artifacts in CI while still building react-native-gesture-handler itself from source.
Changes:
- Adds
@rnrepo/build-toolsto the basic example app and lockfile. - Wires RNRepo into Android Gradle and iOS CocoaPods setup behind CI checks.
- Adds a root
rnrepo.config.jsondenylist soreact-native-gesture-handleris excluded from prebuild consumption.
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| yarn.lock | Locks the new RNRepo build-tools dependency. |
| rnrepo.config.json | Adds RNRepo denylist configuration for Android/iOS. |
| apps/basic-example/package.json | Declares RNRepo build-tools for the example app. |
| apps/basic-example/ios/Podfile | Loads and runs the RNRepo CocoaPods hook in CI. |
| apps/basic-example/android/build.gradle | Resolves and adds the RNRepo Gradle plugin JAR to the buildscript classpath. |
| apps/basic-example/android/app/build.gradle | Applies the RNRepo prebuilds plugin when CI=true. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Future PRs that only update the RNRepo version or denylist will skip the Android build workflow entirely, so build-breaking changes to this integration won't be validated.
|
RNRepo looks for |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 7 out of 8 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
348e37e to
5f609ab
Compare
Co-authored-by: Jakub Piasecki <jakubpiasecki67@gmail.com>
## Description After merging #4141 our expo-example stopped working, throwing errors in Gesture Handler module on Android. From Claude: >1. RNRepo was supplying a stale prebuilt binary for expo-example > >apps/expo-example/android/app/build.gradle applies the RNRepo plugin unconditionally (unlike basic-example which gates it on CI=1). Because there was no rnrepo.config.json in apps/expo-example/, the denyList at the repo root wasn't found. RNRepo injected the prebuilt react-native-gesture-handler@2.29.0 binary, which predates the setReanimatedAvailable TurboModule binding and doesn't have it registered. ## Test plan Run expo-example
Description
Adds RNRepo build-tools integration to
basic-exampleso that CI builds can consume pre-built native dependencies instead of compiling them from scratch, speeding up CI.The integration is guarded by
CI=true/ENV['CI']environment variables, so local development is unaffected.react-native-gesture-handleritself is excluded from prebuilds viarnrepo.config.jsonso that CI always builds and tests the library from source.Changes
apps/basic-example/android/build.gradle— resolves@rnrepo/build-toolsvia Node and adds its Gradle plugin JAR to the buildscript classpath.apps/basic-example/android/app/build.gradle— appliesorg.rnrepo.tools.prebuilds-pluginwhen running in CI.apps/basic-example/ios/Podfile— requires the RNRepo CocoaPods plugin and callsrnrepo_post_installin thepost_installhook, both gated onENV['CI'].apps/basic-example/package.json— adds@rnrepo/build-tools ~0.1.3-beta.0as a dev dependency.rnrepo.config.json— root-level RNRepo config that denylistsreact-native-gesture-handleron both Android and iOS so the library itself is always compiled from source.Performance
CI build time comparison (rnrepo vs baseline):
Android sees ~38% improvement across the board. iOS builds are ~15% faster even without prebuilt
rncore.Test plan
CI=true) still works without any RNRepo-related side effects.CI=trueshould pick up pre-built artifacts via the RNRepo plugin on both Android and iOS.react-native-gesture-handleris excluded from prebuilds via the denylist, ensuring the library under test is always built fresh.