A CircleCI Orb for building and deploying React Native apps.
This orb is a fork of React Native Community's CirleCI Orb with a few changes.
There are several nuances when it comes to CI/CD with React Native: which machines to use, caching, etc. This orb simplifies the process in addition to making the build process for mobile projects consistent.
We recommend reading the Using Orbs guide from the CircleCI documentation to get an overview of how to use Orbs.
This Orb provides three different categories of tools to help you build and test your React Native app on CircleCI:
- Executors: Machines which are configured for use with React Native.
- Commands: Individual tasks which you can piece together in your own jobs to perform tasks like installing dependencies, building an APK, or running Detox tests.
- Jobs: Groups of commands which are typically used together as a stage in a pipeline.
- Inside CirleCI, enable these settings:
- 3rd party orbs:
Your Org -> Settings -> Security -> Enable Usage of 3rd Party Orbs
- Pipelines:
Project Settings -> Advanced Settings -> Pipelines
- Use CircleCI version 2.1 at the top of your
.circleci/config.yml
version: 2.1
- Invoke the orb in your config:
orbs:
rn: gretzky/[email protected]
You can now use elements from the orb in your workspace by prefixing them with rn
. You can change rn
to anything you'd like.
- Android only: Add this task in
android/app/build.gradle
task downloadDependencies() {
description 'Download all dependencies to the Gradle cache'
doLast {
configurations.findAll().each { config ->
if (config.name.contains("minReactNative") && config.canBeResolved) {
print config.name
print '\n'
config.files
}
}
}
}
See the examples.
Please see the open issues for a list of known issues / proposed features.
Contributions are welcome! Any contributions you make are greatly appreciated. Please see CONTRIBUTING.md and our Code of Conduct.
Distributed under the MIT license