Rnrepo

software-mansion-labs/skills/skills/rnrepo

作者 software-mansion-labse3f00cdb3494MIT291 个星标收录于 2026年10月8日更新于 2026年10月8日仓库10天前更新

Best practices for integrating and using RNRepo — Software Mansion's infrastructure for pre-built React Native library artifacts that reduces native build times by up to 2×. Use when setting up, configuring, or troubleshooting RNRepo in a React Native or Expo project. Trigger on: 'RNRepo', 'rnrepo', 'slow builds', 'build times', 'prebuilt artifacts', 'prebuilt libraries', '@rnrepo/expo-config-plugin', '@rnrepo/build-tools', 'prebuilds-plugin', 'rnrepo.config.json', 'DISABLE_RNREPO', 'packages.rnrepo.org', 'Maven prebuild', 'CocoaPods prebuild', 'xcframework prebuild', 'prebuild AAR', 'build from source', 'native compilation slow', 'Gradle plugin slow', 'pod install slow', 'CI build times'.

AI 生成的概览

指导 RNRepo 预构建 React Native 库产物的安装、配置与排错,以缩短原生构建时间。

功能
该技能提供集成 RNRepo(Software Mansion 用于预构建 React Native 库产物的基础设施)的最佳实践。内容涵盖 Expo CNG 与标准 React Native 项目的安装、通过 rnrepo.config.json 的 denyList 按库退出以及用 DISABLE_RNREPO 完全退出等配置,以及构建失败的排查。它依据随附的安装、配置和排错三份参考文档给出指导。
适用场景
适用于在 React Native 或 Expo 项目中安装、配置或排查 RNRepo 的场景。当原生构建缓慢、准备采用预构建产物,或需要诊断 Gradle 与 CocoaPods 插件相关构建失败时使用。
运行要求
无脚本,仅包含说明与参考文档。所述配置面向 React Native 0.77、0.78、0.79 及 0.80.0 以上版本并需新架构,涉及 @rnrepo/expo-config-plugin 或 @rnrepo/build-tools 以及 Gradle 和 CocoaPods 配置。产物分发隐含需要访问 packages.rnrepo.org 的网络连接。

RNRepo

Software Mansion's infrastructure for pre-building and distributing React Native library artifacts, reducing native build times by up to 2× with zero infrastructure changes.

Read the relevant reference for the topic at hand. All references are in references/.

Key facts

  • Beta, New Architecture only. Works with React Native latest patches of 0.77, 0.78, 0.79 and all versions above 0.80.0.
  • How it works: A Gradle plugin (Android) and CocoaPods plugin (iOS) intercept the build and substitute libraries with prebuilt artifacts from packages.rnrepo.org. Falls back to source if a prebuild is unavailable.
  • Expo CNG: Use @rnrepo/expo-config-plugin — it configures both Android and iOS automatically.
  • Standard RN: Install @rnrepo/build-tools and edit android/build.gradle, android/app/build.gradle, and ios/Podfile manually.
  • Opt out per library: Add a rnrepo.config.json with a denyList at the project root. Required for libraries with native patches (Objective-C/Java/Kotlin). JS-only patches do NOT require opting out.
  • Opt out entirely: Set DISABLE_RNREPO=1 environment variable before the build command.

References

FileWhen to read
references/installation.mdSetting up RNRepo for the first time — Expo CNG, standard React Native, Android Gradle, iOS CocoaPods
references/configuration.mdOpting out specific libraries (denyList), disabling the plugin, Fingerprint config, GPG verification
references/troubleshooting.mdBuild failures, C++ debug/release mismatch, duplicate .so files, Xcode version issues, empty repository list, verifying the plugin works

来源与署名

来源:software-mansion-labs/skills位于skills/rnrepo提交e3f00cd

许可证: MIT

内容归原作者所有。SourceWeft 从公开仓库中收录这些内容。

举报或申请下架