@rnrepo/build-tools
v0.1.2-beta.0
Published
RNRepo plugin for handling prebuilt binaries of iOS and Android libraries
Downloads
19,054
Readme
@rnrepo/build-tools
RNRepo plugin for handling prebuilt binaries of iOS and Android libraries in React Native projects.
This package includes both a Gradle plugin for Android and a CocoaPods plugin for iOS, enabling you to automatically download and integrate prebuilt libraries without building from source.
Installation
For React Native Projects
Install the package:
npm install @rnrepo/build-tools
# or
yarn add @rnrepo/build-tools
# or
bun add @rnrepo/build-toolsFor Expo Managed Projects
See the @rnrepo/expo-config-plugin package for instructions on using RNRepo with Expo Managed workflows.
Android Configuration
Add the following to your project's android/build.gradle file:
buildscript {
dependencies {
...
+ def rnrepoDir = new File(
+ providers.exec {
+ workingDir(rootDir)
+ commandLine("node", "--print", "require.resolve('@rnrepo/build-tools/package.json')")
+ }.standardOutput.asText.get().trim()
+ ).getParentFile().absolutePath
+ classpath fileTree(dir: "${rnrepoDir}/gradle-plugin/build/libs", include: ["prebuilds-plugin.jar"])
}
}
allprojects {
repositories {
+ maven { url "https://packages.rnrepo.org/releases" }
}
}
apply plugin: "com.facebook.react.rootproject"Then, apply the plugin in your android/app/build.gradle file:
apply plugin: "com.facebook.react"
+ apply plugin: "org.rnrepo.tools.prebuilds-plugin"iOS Configuration
Add to the beginning of your Podfile:
+require Pod::Executable.execute_command('node', ['-p',
+ 'require.resolve(
+ "@rnrepo/build-tools/cocoapods-plugin/lib/plugin.rb",
+ {paths: [process.argv[1]]},
+ )', __dir__]).stripAnd inside the post_install block:
post_install do |installer|
+ rnrepo_post_install(installer)
...
endHow It Works
The RNRepo Prebuilds Plugin automatically detects supported libraries in your React Native project and downloads their prebuilt binaries during the build process. This significantly reduces build times and simplifies dependency management.
Supported Libraries
The plugin supports prebuilt binaries for:
- react-native-reanimated
- react-native-gesture-handler
- react-native-screens
- @shopify/react-native-skia
- And many more...
Check the RNRepo Supported Libraries for the full list of supported libraries.
License
ISC License
Support
For issues, questions, or feature requests, please visit:
RNRepo is created by Software Mansion
Since 2012 Software Mansion is a software agency with experience in building web and mobile apps. We are Core React Native Contributors and experts in dealing with all kinds of React Native issues. We can help you build your next dream product – Hire us.
