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 從公開儲存庫中收錄這些內容。

檢舉或申請下架