main bbc3b7ac053c cached
34 files
88.9 KB
23.7k tokens
1 requests
Download .txt
Repository: react-native-community/react-native-circleci-orb
Branch: main
Commit: bbc3b7ac053c
Files: 34
Total size: 88.9 KB

Directory structure:
gitextract_ood6vf5p/

├── .circleci/
│   ├── config.yml
│   └── test-deploy.yml
├── .github/
│   └── ISSUE_TEMPLATE/
│       ├── bug_report.md
│       └── feature_request.md
├── .gitignore
├── .releaserc
├── .yamllint
├── CHANGELOG.md
├── LICENSE
├── README.md
├── package.json
└── src/
    ├── @orb.yml
    ├── commands/
    │   ├── android_build.yml
    │   ├── android_emulator_start.yml
    │   ├── bundle.yml
    │   ├── detox_build.yml
    │   ├── detox_test.yml
    │   ├── ios_build.yml
    │   ├── ios_simulator_start.yml
    │   ├── metro_start.yml
    │   ├── ndk_update.yml
    │   ├── pod_install.yml
    │   ├── setup_macos_executor.yml
    │   └── yarn_install.yml
    ├── examples/
    │   ├── android.yml
    │   ├── full.yml
    │   └── ios.yml
    ├── executors/
    │   ├── linux_android.yml
    │   ├── linux_js.yml
    │   └── macos.yml
    └── jobs/
        ├── android_build.yml
        ├── android_test.yml
        ├── ios_build.yml
        └── ios_build_and_test.yml

================================================
FILE CONTENTS
================================================

================================================
FILE: .circleci/config.yml
================================================
version: 2.1
setup: true
orbs:
  orb-tools: circleci/orb-tools@12.0
  shellcheck: circleci/shellcheck@3.1

filters: &filters
  tags:
    only: /.*/

workflows:
  lint-pack:
    jobs:
      - orb-tools/lint:
          filters: *filters
      - orb-tools/pack:
          filters: *filters
      - orb-tools/review:
          exclude: RC002,RC005,RC009
          filters: *filters
      - shellcheck/check:
          filters: *filters
      - orb-tools/continue:
          pipeline_number: << pipeline.number >>
          vcs_type: << pipeline.project.type >>
          orb_name: react-native
          requires: [orb-tools/lint, orb-tools/pack, orb-tools/review, shellcheck/check]
          filters: *filters


================================================
FILE: .circleci/test-deploy.yml
================================================
version: 2.1
orbs:
  orb-tools: circleci/orb-tools@12.0
  node: circleci/node@5.2.0
  # The orb definition is intentionally not included here. It will be injected into the pipeline.
  react-native: {}

filters: &filters
  tags:
    only: /.*/

# Filter for release tags.
release-filters: &release-filters
  branches:
    ignore: /.*/
  tags:
    only: /^v[0-9]+\.[0-9]+\.[0-9]+$/

jobs:
  command-test:
    docker:
      - image: cimg/node:current
    steps:
      - checkout
      - react-native/yarn_install

workflows:
  test-deploy:
    jobs:
      - command-test:
          filters: *filters

      - node/run:
          yarn-run: semantic-release
          version: "20.11"
          pkg-manager: yarn
          requires:
            - command-test
          filters:
            branches:
              only: main

      - orb-tools/pack:
          filters: *release-filters

      - orb-tools/publish:
          orb_name: react-native-community/react-native
          vcs_type: << pipeline.project.type >>
          pub_type: production
          requires:
            - orb-tools/pack
            - command-test
          context: orb-publishing
          filters: *release-filters


================================================
FILE: .github/ISSUE_TEMPLATE/bug_report.md
================================================
---
name: "Bug report"
about: Create a report to help improve the project
labels: bug

---

### Orb version

<!---
  e.g., 1.0.0
  find this information in your config.yml file;
  if the version is @volatile, check the top of your CircleCI-generated,
  expanded configuration file, viewable from the "Configuration" tab of
  any job page, for the orb's specific semantic version number
-->

### What happened

<!---
  please include any relevant links to CircleCI workflows or jobs
  where you saw this behavior
-->

### Expected behavior

<!--- what should happen, ideally? -->


================================================
FILE: .github/ISSUE_TEMPLATE/feature_request.md
================================================
---
name: "Feature request"
about: Suggest an idea that will improve the project
labels: enhancement

---

## What would you like to be added

<!---
  please describe the idea you have and the problem you are trying to solve
-->

## Why is this needed

<!---
  please explain why is this feature needed and how it improves the project
-->


================================================
FILE: .gitignore
================================================

# Created by https://www.gitignore.io/api/macos,windows,linux,node

### Linux ###
*~

# temporary files which can be created if a process still has a handle open of a deleted file
.fuse_hidden*

# KDE directory preferences
.directory

# Linux trash folder which might appear on any partition or disk
.Trash-*

# .nfs files are created when an open file is removed but is still being accessed
.nfs*

### macOS ###
*.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon

# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

### Node ###
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Typescript v1 declaration files
typings/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env


### Windows ###
# Windows thumbnail cache files
Thumbs.db
ehthumbs.db
ehthumbs_vista.db

# Folder config file
Desktop.ini

# Recycle Bin used on file shares
$RECYCLE.BIN/

# Windows Installer files
*.cab
*.msi
*.msm
*.msp

# Windows shortcuts
*.lnk

# End of https://www.gitignore.io/api/macos,windows,linux,node


================================================
FILE: .releaserc
================================================
{
  "branches": ["main"],
  "plugins": [
    "@semantic-release/commit-analyzer",
    "@semantic-release/release-notes-generator",
    "@semantic-release/changelog",
    [
      "@semantic-release/npm",
      {
        "npmPublish": false
      }
    ],
    "@semantic-release/github",
    [
      "@semantic-release/git",
      {
        "assets": ["CHANGELOG.md", "package.json"],
        "message": "chore(release): ${nextRelease.version} [skip ci] \n\n${nextRelease.notes}"
      }
    ]
  ]
}


================================================
FILE: .yamllint
================================================
extends: relaxed

rules:
    line-length:
        max: 200
        allow-non-breakable-inline-mappings: true



================================================
FILE: CHANGELOG.md
================================================
## [8.0.1](https://github.com/react-native-community/react-native-circleci-orb/compare/v8.0.0...v8.0.1) (2024-12-29)


### Bug Fixes

* remove pod_install command cache fallback ([06b0432](https://github.com/react-native-community/react-native-circleci-orb/commit/06b0432))

# [8.0.0](https://github.com/react-native-community/react-native-circleci-orb/compare/v7.4.0...v8.0.0) (2024-05-23)


### Bug Fixes

* remove _JAVA_OPTIONS parameter & environment (closes [#171](https://github.com/react-native-community/react-native-circleci-orb/issues/171)) ([d737af9](https://github.com/react-native-community/react-native-circleci-orb/commit/d737af9))


* Merge pull request #172 from devnev/no-java-options-env ([a7d373e](https://github.com/react-native-community/react-native-circleci-orb/commit/a7d373e)), closes [#172](https://github.com/react-native-community/react-native-circleci-orb/issues/172)


### BREAKING CHANGES

* The java_options parameter has been removed. Specify your JVM options in the gradle.properties file or in the gradle_options with -Dorg.gradle.jvmargs= instead.

# [7.4.0](https://github.com/react-native-community/react-native-circleci-orb/compare/v7.3.0...v7.4.0) (2024-02-12)


### Features

* support a custom pod install command ([d15769f](https://github.com/react-native-community/react-native-circleci-orb/commit/d15769f))

# [7.3.0](https://github.com/react-native-community/react-native-circleci-orb/compare/v7.2.0...v7.3.0) (2023-07-12)


### Bug Fixes

* yaml parsing build_image_version default as double ([df23a73](https://github.com/react-native-community/react-native-circleci-orb/commit/df23a73))
* yaml parsing build_image_version default as double ([#170](https://github.com/react-native-community/react-native-circleci-orb/issues/170)) ([3c8cb0f](https://github.com/react-native-community/react-native-circleci-orb/commit/3c8cb0f))


### Features

* allow specifying build image version for android build & executor ([ee50537](https://github.com/react-native-community/react-native-circleci-orb/commit/ee50537))

# [7.2.0](https://github.com/react-native-community/react-native-circleci-orb/compare/v7.1.1...v7.2.0) (2023-07-11)


### Features

* Skip Detox setup in ios_build job ([3fc5c53](https://github.com/react-native-community/react-native-circleci-orb/commit/3fc5c53))

## [7.1.1](https://github.com/react-native-community/react-native-circleci-orb/compare/v7.1.0...v7.1.1) (2022-08-03)


### Bug Fixes

* update XCode version to 12.5.1 ([#158](https://github.com/react-native-community/react-native-circleci-orb/issues/158)) ([4bbdb75](https://github.com/react-native-community/react-native-circleci-orb/commit/4bbdb75))

# [7.1.0](https://github.com/react-native-community/react-native-circleci-orb/compare/v7.0.1...v7.1.0) (2022-06-18)


### Bug Fixes

* **android_test:** node v12 to v16 ([a9956b7](https://github.com/react-native-community/react-native-circleci-orb/commit/a9956b7))
* **ios_build:** node v12 to v16 ([f0ea6b4](https://github.com/react-native-community/react-native-circleci-orb/commit/f0ea6b4))
* **ios_build_and_test:** node v12 to v16 ([6347597](https://github.com/react-native-community/react-native-circleci-orb/commit/6347597))
* **setup_macos_executor:** bump node v12 to v16 ([a34ccec](https://github.com/react-native-community/react-native-circleci-orb/commit/a34ccec))


### Features

* **node:** bump from node 12 to node 16 default ([0acc6f9](https://github.com/react-native-community/react-native-circleci-orb/commit/0acc6f9))

## [7.0.1](https://github.com/react-native-community/react-native-circleci-orb/compare/v7.0.0...v7.0.1) (2022-06-10)


### Bug Fixes

* 'an unexpected storage error occurred' on multiline keys ([b9fb1bb](https://github.com/react-native-community/react-native-circleci-orb/commit/b9fb1bb))

# [7.0.0](https://github.com/react-native-community/react-native-circleci-orb/compare/v6.8.1...v7.0.0) (2022-04-26)


### Bug Fixes

* removing old yarn version from PATH which hopefully fixes the issue ([cc25fff](https://github.com/react-native-community/react-native-circleci-orb/commit/cc25fff))


* fix!: using supported Node version with cimg/node and updating comments ([1186c41](https://github.com/react-native-community/react-native-circleci-orb/commit/1186c41))


### BREAKING CHANGES

* cimg/node doesn't support major Node version aliases the same way circleci/node did

## [6.8.1](https://github.com/react-native-community/react-native-circleci-orb/compare/v6.8.0...v6.8.1) (2022-02-27)


### Bug Fixes

* add missing CACHE_VERSION in pod_install ([b6c7e99](https://github.com/react-native-community/react-native-circleci-orb/commit/b6c7e99))
* quote cache keys that start with special characters ([b217d8c](https://github.com/react-native-community/react-native-circleci-orb/commit/b217d8c))

# [6.8.0](https://github.com/react-native-community/react-native-circleci-orb/compare/v6.7.0...v6.8.0) (2022-02-15)


### Features

* allow passing executor parameters to test jobs ([#141](https://github.com/react-native-community/react-native-circleci-orb/issues/141)) ([eea6098](https://github.com/react-native-community/react-native-circleci-orb/commit/eea6098)), closes [#112](https://github.com/react-native-community/react-native-circleci-orb/issues/112)

# [6.7.0](https://github.com/react-native-community/react-native-circleci-orb/compare/v6.6.0...v6.7.0) (2022-02-15)


### Features

* add pod_cache param to ios_build job ([#140](https://github.com/react-native-community/react-native-circleci-orb/issues/140)) ([f18183f](https://github.com/react-native-community/react-native-circleci-orb/commit/f18183f))

# [6.6.0](https://github.com/react-native-community/react-native-circleci-orb/compare/v6.5.0...v6.6.0) (2022-02-14)


### Features

* allow passing executor parameters to jobs ([#133](https://github.com/react-native-community/react-native-circleci-orb/issues/133)) ([4a199fd](https://github.com/react-native-community/react-native-circleci-orb/commit/4a199fd))

# [6.5.0](https://github.com/react-native-community/react-native-circleci-orb/compare/v6.4.0...v6.5.0) (2022-02-14)


### Features

* allow passing pod_install_directory during ios_build job ([#136](https://github.com/react-native-community/react-native-circleci-orb/issues/136)) ([faa7a01](https://github.com/react-native-community/react-native-circleci-orb/commit/faa7a01))

# [6.4.0](https://github.com/react-native-community/react-native-circleci-orb/compare/v6.3.0...v6.4.0) (2022-02-14)


### Features

* pass through pod cache param from job to command ([#138](https://github.com/react-native-community/react-native-circleci-orb/issues/138)) ([b156c1b](https://github.com/react-native-community/react-native-circleci-orb/commit/b156c1b))

# [6.3.0](https://github.com/react-native-community/react-native-circleci-orb/compare/v6.2.2...v6.3.0) (2022-01-30)


### Features

* add homebrew_update parameter to toggle brew update ([#131](https://github.com/react-native-community/react-native-circleci-orb/issues/131)) ([6a7d635](https://github.com/react-native-community/react-native-circleci-orb/commit/6a7d635))

## [6.2.2](https://github.com/react-native-community/react-native-circleci-orb/compare/v6.2.1...v6.2.2) (2022-01-28)


### Bug Fixes

* **android:** fix gradle build cache key ([#130](https://github.com/react-native-community/react-native-circleci-orb/issues/130) by [@fotos](https://github.com/fotos)) ([acadf02](https://github.com/react-native-community/react-native-circleci-orb/commit/acadf02))

## [6.2.1](https://github.com/react-native-community/react-native-circleci-orb/compare/v6.2.0...v6.2.1) (2022-01-27)


### Bug Fixes

* **ios:** update default ios device to iPhone 11 ([#127](https://github.com/react-native-community/react-native-circleci-orb/issues/127)) ([2e3b1e0](https://github.com/react-native-community/react-native-circleci-orb/commit/2e3b1e0))

# [6.2.0](https://github.com/react-native-community/react-native-circleci-orb/compare/v6.1.0...v6.2.0) (2022-01-17)


### Features

* **ios:** control if simulator starts in background ([#126](https://github.com/react-native-community/react-native-circleci-orb/issues/126)) ([08338f9](https://github.com/react-native-community/react-native-circleci-orb/commit/08338f9))

# [6.1.0](https://github.com/react-native-community/react-native-circleci-orb/compare/v6.0.1...v6.1.0) (2022-01-04)


### Features

* add optional yarn_install_directory parameter ([#124](https://github.com/react-native-community/react-native-circleci-orb/issues/124)) ([3c659f9](https://github.com/react-native-community/react-native-circleci-orb/commit/3c659f9))

## [6.0.1](https://github.com/react-native-community/react-native-circleci-orb/compare/v6.0.0...v6.0.1) (2021-11-19)


### Bug Fixes

* **android:** move docker android pin to JDK11 version ([#123](https://github.com/react-native-community/react-native-circleci-orb/issues/123)) ([d74d427](https://github.com/react-native-community/react-native-circleci-orb/commit/d74d427)), closes [#122](https://github.com/react-native-community/react-native-circleci-orb/issues/122)

# [6.0.0](https://github.com/react-native-community/react-native-circleci-orb/compare/v5.6.2...v6.0.0) (2021-11-19)


### Bug Fixes

* **android:** use JDK11 compatible JVM options ([#122](https://github.com/react-native-community/react-native-circleci-orb/issues/122)) ([1923bcd](https://github.com/react-native-community/react-native-circleci-orb/commit/1923bcd)), closes [#120](https://github.com/react-native-community/react-native-circleci-orb/issues/120)


### BREAKING CHANGES

* **android:** this orb is now using JDK11

See JDK8-->JDK11 migration notes here:
https://discuss.circleci.com/t/android-convenience-image-moving-to-java-v11-on-august-17th/36601/4

## [5.6.2](https://github.com/react-native-community/react-native-circleci-orb/compare/v5.6.1...v5.6.2) (2021-11-19)


### Bug Fixes

* **android:** pin docker image to 4.2 for JDK8 ([#121](https://github.com/react-native-community/react-native-circleci-orb/issues/121)) ([fe2898a](https://github.com/react-native-community/react-native-circleci-orb/commit/fe2898a)), closes [#120](https://github.com/react-native-community/react-native-circleci-orb/issues/120)

## [5.6.1](https://github.com/react-native-community/react-native-circleci-orb/compare/v5.6.0...v5.6.1) (2021-11-19)


### Bug Fixes

* do not cache /usr/local/Homebrew ([#119](https://github.com/react-native-community/react-native-circleci-orb/issues/119)) ([597e597](https://github.com/react-native-community/react-native-circleci-orb/commit/597e597))

# [5.6.0](https://github.com/react-native-community/react-native-circleci-orb/compare/v5.5.1...v5.6.0) (2021-10-22)


### Features

* **android:** Pass through the `assemble_android_test` parameter from the `android_build` job to the command ([#109](https://github.com/react-native-community/react-native-circleci-orb/issues/109) by [@ronwsmith](https://github.com/ronwsmith)) ([9f2e7fa](https://github.com/react-native-community/react-native-circleci-orb/commit/9f2e7fa))

## [5.5.1](https://github.com/react-native-community/react-native-circleci-orb/compare/v5.5.0...v5.5.1) (2021-10-22)


### Bug Fixes

* **android:** Added new Android Command Line Tools for MacOS 12+ and Java 9, 10, 11 ([#114](https://github.com/react-native-community/react-native-circleci-orb/issues/114) by [@lukebrandonfarrell](https://github.com/lukebrandonfarrell)) ([aeb45fe](https://github.com/react-native-community/react-native-circleci-orb/commit/aeb45fe))

# [5.5.0](https://github.com/react-native-community/react-native-circleci-orb/compare/v5.4.0...v5.5.0) (2021-07-28)


### Features

* **Android:** Add optional command-running step after the emulator starts ([#110](https://github.com/react-native-community/react-native-circleci-orb/issues/110) by [@ronwsmith](https://github.com/ronwsmith)) ([5ee8a30](https://github.com/react-native-community/react-native-circleci-orb/commit/5ee8a30))

# [5.4.0](https://github.com/react-native-community/react-native-circleci-orb/compare/v5.3.0...v5.4.0) (2021-07-13)


### Features

* Make yarn cache folder configurable ([#103](https://github.com/react-native-community/react-native-circleci-orb/issues/103) by [@ronwsmith](https://github.com/ronwsmith)) ([c6ccaa1](https://github.com/react-native-community/react-native-circleci-orb/commit/c6ccaa1))

# [5.3.0](https://github.com/react-native-community/react-native-circleci-orb/compare/v5.2.0...v5.3.0) (2021-06-02)


### Features

* **android:** Add command to update the NDK to a given version ([#91](https://github.com/react-native-community/react-native-circleci-orb/issues/91) by @CHNB128) ([64eac35](https://github.com/react-native-community/react-native-circleci-orb/commit/64eac35))
* **android:** Add hombrew cache param to android test job ([#96](https://github.com/react-native-community/react-native-circleci-orb/issues/96) by @Kyonru) ([8314b6e](https://github.com/react-native-community/react-native-circleci-orb/commit/8314b6e))

# [5.2.0](https://github.com/react-native-community/react-native-circleci-orb/compare/v5.1.0...v5.2.0) (2021-06-02)


### Features

* add parameter to allow configuring the android tests on build ([0569d66](https://github.com/react-native-community/react-native-circleci-orb/commit/0569d66))

# [5.1.0](https://github.com/react-native-community/react-native-circleci-orb/compare/v5.0.0...v5.1.0) (2021-03-24)


### Features

* Add parameters to disable caching ([ad81e99](https://github.com/react-native-community/react-native-circleci-orb/commit/ad81e99))

# [5.0.0](https://github.com/react-native-community/react-native-circleci-orb/compare/v4.5.3...v5.0.0) (2021-03-18)


### Features

* Update default dependencies to meet React Native 0.64 requirements ([34ca501](https://github.com/react-native-community/react-native-circleci-orb/commit/34ca501))


### BREAKING CHANGES

* The default dependencies used are now Xcode 12, CocoaPods 1.10.1, Node.js 12

## [4.5.3](https://github.com/react-native-community/react-native-circleci-orb/compare/v4.5.2...v4.5.3) (2021-03-18)


### Bug Fixes

* Remove Deprecated CircleCI Spec Repo Cache ([#82](https://github.com/react-native-community/react-native-circleci-orb/issues/82) by @BytesGuy) ([f45fcfe](https://github.com/react-native-community/react-native-circleci-orb/commit/f45fcfe))

## [4.5.2](https://github.com/react-native-community/react-native-circleci-orb/compare/v4.5.1...v4.5.2) (2021-03-18)


### Bug Fixes

* **android:** Fix Permission denied issues when running gradlew ([#72](https://github.com/react-native-community/react-native-circleci-orb/issues/72) by [@zpd106](https://github.com/zpd106)) ([0e22ef8](https://github.com/react-native-community/react-native-circleci-orb/commit/0e22ef8))

## [4.5.1](https://github.com/react-native-community/react-native-circleci-orb/compare/v4.5.0...v4.5.1) (2021-03-18)


### Bug Fixes

* Remove deprecated cask usage from brew install ([#85](https://github.com/react-native-community/react-native-circleci-orb/issues/85) by @CHNB128) ([de4ef76](https://github.com/react-native-community/react-native-circleci-orb/commit/de4ef76))

# [4.5.0](https://github.com/react-native-community/react-native-circleci-orb/compare/v4.4.2...v4.5.0) (2021-03-18)


### Bug Fixes

* duplicated on_after_initialize  param ([#78](https://github.com/react-native-community/react-native-circleci-orb/issues/78)) ([33ffc6b](https://github.com/react-native-community/react-native-circleci-orb/commit/33ffc6b))


### Features

* Add pod cache ([#67](https://github.com/react-native-community/react-native-circleci-orb/issues/67)) ([96b0f3f](https://github.com/react-native-community/react-native-circleci-orb/commit/96b0f3f))

## [4.4.2](https://github.com/react-native-community/react-native-circleci-orb/compare/v4.4.1...v4.4.2) (2020-05-18)


### Bug Fixes

* **android:** Ensure the Android emulator looks correct ([#65](https://github.com/react-native-community/react-native-circleci-orb/issues/65) by [@vonovak](https://github.com/vonovak)) ([57744a4](https://github.com/react-native-community/react-native-circleci-orb/commit/57744a4))

## [4.4.1](https://github.com/react-native-community/react-native-circleci-orb/compare/v4.4.0...v4.4.1) (2020-05-18)


### Bug Fixes

* **android:** Update android_emulator_start.yml to use the new  emulator ([#64](https://github.com/react-native-community/react-native-circleci-orb/issues/64) by [@vonovak](https://github.com/vonovak)) ([73d27e2](https://github.com/react-native-community/react-native-circleci-orb/commit/73d27e2))

# [4.4.0](https://github.com/react-native-community/react-native-circleci-orb/compare/v4.3.0...v4.4.0) (2020-05-09)


### Features

* Add a `store_artifact_path` to the Android and iOS test jobs which allow storing artifacts after a job runs ([#54](https://github.com/react-native-community/react-native-circleci-orb/issues/54) by @MateusAndrade) ([19edf8a](https://github.com/react-native-community/react-native-circleci-orb/commit/19edf8a))

# [4.3.0](https://github.com/react-native-community/react-native-circleci-orb/compare/v4.2.3...v4.3.0) (2020-05-09)


### Features

* follow emulator best practices ([a5765a2](https://github.com/react-native-community/react-native-circleci-orb/commit/a5765a2))
* follow emulator best practices ([#62](https://github.com/react-native-community/react-native-circleci-orb/issues/62)) ([ac709c1](https://github.com/react-native-community/react-native-circleci-orb/commit/ac709c1))

## [4.2.3](https://github.com/react-native-community/react-native-circleci-orb/compare/v4.2.2...v4.2.3) (2020-05-09)


### Bug Fixes

* **android:** fix JAVA_HOME path ([#61](https://github.com/react-native-community/react-native-circleci-orb/issues/61) by [@vonovak](https://github.com/vonovak)) ([e4fa01f](https://github.com/react-native-community/react-native-circleci-orb/commit/e4fa01f))
* **android:** fix path to emulator ([#60](https://github.com/react-native-community/react-native-circleci-orb/issues/60) by [@vonovak](https://github.com/vonovak)) ([8621ec9](https://github.com/react-native-community/react-native-circleci-orb/commit/8621ec9))
* Move cache directory to the system temp folder to avoid permission issues ([#59](https://github.com/react-native-community/react-native-circleci-orb/issues/59) by @Naturalclar) ([15f0d90](https://github.com/react-native-community/react-native-circleci-orb/commit/15f0d90))

## [4.2.2](https://github.com/react-native-community/react-native-circleci-orb/compare/v4.2.1...v4.2.2) (2020-04-23)


### Bug Fixes

* **ios:** Revert changes from 4.2.0 ([2c3fa5e](https://github.com/react-native-community/react-native-circleci-orb/commit/2c3fa5e))

## [4.2.1](https://github.com/react-native-community/react-native-circleci-orb/compare/v4.2.0...v4.2.1) (2020-04-22)


### Bug Fixes

* **ios:** Fix syntax errors ([aff9136](https://github.com/react-native-community/react-native-circleci-orb/commit/aff9136))

# [4.2.0](https://github.com/react-native-community/react-native-circleci-orb/compare/v4.1.1...v4.2.0) (2020-04-21)


### Features

* **ios:** Ensure a simulator with the latest iOS version exists for the given name when testing ([2d614fa](https://github.com/react-native-community/react-native-circleci-orb/commit/2d614fa))

## [4.1.1](https://github.com/react-native-community/react-native-circleci-orb/compare/v4.1.0...v4.1.1) (2020-04-20)


### Bug Fixes

* **ios:** Possible fix for the NVM node version not carrying over between steps ([#51](https://github.com/react-native-community/react-native-circleci-orb/issues/51)) ([ae71c53](https://github.com/react-native-community/react-native-circleci-orb/commit/ae71c53))

# [4.1.0](https://github.com/react-native-community/react-native-circleci-orb/compare/v4.0.4...v4.1.0) (2020-04-03)


### Features

* **ios:** Add Cocoapods Install Command ([#48](https://github.com/react-native-community/react-native-circleci-orb/issues/48) by [@vonovak](https://github.com/vonovak)) ([a743bbc](https://github.com/react-native-community/react-native-circleci-orb/commit/a743bbc))

## [4.0.4](https://github.com/react-native-community/react-native-circleci-orb/compare/v4.0.3...v4.0.4) (2020-04-03)


### Bug Fixes

* Mac node install ([#47](https://github.com/react-native-community/react-native-circleci-orb/issues/47) by [@vonovak](https://github.com/vonovak)) ([4a4b619](https://github.com/react-native-community/react-native-circleci-orb/commit/4a4b619))

## [4.0.3](https://github.com/react-native-community/react-native-circleci-orb/compare/v4.0.2...v4.0.3) (2020-04-02)


### Bug Fixes

* Ensure that the publish steps works correctly ([7e6c289](https://github.com/react-native-community/react-native-circleci-orb/commit/7e6c289))

## [4.0.2](https://github.com/react-native-community/react-native-circleci-orb/compare/v4.0.1...v4.0.2) (2020-04-02)


### Bug Fixes

* Ensure the CI works correctly ([51d7f49](https://github.com/react-native-community/react-native-circleci-orb/commit/51d7f49))

## [4.0.1](https://github.com/react-native-community/react-native-circleci-orb/compare/v4.0.0...v4.0.1) (2020-04-02)


### Bug Fixes

* **android:** Define a max heap size for linux_android ([#46](https://github.com/react-native-community/react-native-circleci-orb/issues/46) by [@vabanagas](https://github.com/vabanagas)) ([d029e0b](https://github.com/react-native-community/react-native-circleci-orb/commit/d029e0b))

# [4.0.0](https://github.com/react-native-community/react-native-circleci-orb/compare/v3.0.1...v4.0.0) (2020-03-31)


### Features

* **ios:** Upgrading Xcode to 11.0 ([#45](https://github.com/react-native-community/react-native-circleci-orb/issues/45) by [@springcoil](https://github.com/springcoil)) ([78aad72](https://github.com/react-native-community/react-native-circleci-orb/commit/78aad72))


### BREAKING CHANGES

* **ios:** You should confirm that your app is able to build on Xcode 11 before upgrade, however, most app will already support this.

## [3.0.1](https://github.com/react-native-community/react-native-circleci-orb/compare/v3.0.0...v3.0.1) (2020-02-03)


### Bug Fixes

* Fix errors when installing NodeJS on MacOS executor ([#40](https://github.com/react-native-community/react-native-circleci-orb/issues/40) by [@roni-castro](https://github.com/roni-castro)) ([19ac8f7](https://github.com/react-native-community/react-native-circleci-orb/commit/19ac8f7))

# [3.0.0](https://github.com/react-native-community/react-native-circleci-orb/compare/v2.0.1...v3.0.0) (2020-01-26)


### Features

* Use Node 10 by default ([#37](https://github.com/react-native-community/react-native-circleci-orb/issues/37) by [@roni-castro](https://github.com/roni-castro)) ([3e7efc6](https://github.com/react-native-community/react-native-circleci-orb/commit/3e7efc6))


### BREAKING CHANGES

* Node 10 is now the default version. The previous default of Node 8 is now end-of-life. Most users will have no issues with upgrading unless they use modules which rely on Node 8 behaviour. You can also now use the `node_version` parameter to set the Node version you require.

## [2.0.1](https://github.com/react-native-community/react-native-circleci-orb/compare/v2.0.0...v2.0.1) (2020-01-04)


### Bug Fixes

* Removed the unused `build_threads` parameter in the `linux_android` executor ([97720b9](https://github.com/react-native-community/react-native-circleci-orb/commit/97720b9)), closes [#19](https://github.com/react-native-community/react-native-circleci-orb/issues/19)

# [2.0.0](https://github.com/react-native-community/react-native-circleci-orb/compare/v1.5.0...v2.0.0) (2020-01-04)


### Features

* Added the `--frozen-lockfile` flag to the `yarn_install` command ([e4676c4](https://github.com/react-native-community/react-native-circleci-orb/commit/e4676c4)), closes [#28](https://github.com/react-native-community/react-native-circleci-orb/issues/28)


### BREAKING CHANGES

* The `yarn_install` command will now fail if there need to be changes made to your `yarn.lock` file. See [the Yarn documentation](https://yarnpkg.com/en/docs/cli/install#toc-yarn-install-frozen-lockfile) for details on this flag.

# [1.5.0](https://github.com/react-native-community/react-native-circleci-orb/compare/v1.4.0...v1.5.0) (2020-01-04)


### Features

* Add `on_after_initialize` parameter to the jobs ([#26](https://github.com/react-native-community/react-native-circleci-orb/issues/26) by [@compojoom](https://github.com/compojoom)) ([0ff6621](https://github.com/react-native-community/react-native-circleci-orb/commit/0ff6621))
* Add a `bundle` command ([#8](https://github.com/react-native-community/react-native-circleci-orb/issues/8) by [@sunilchalla](https://github.com/sunilchalla)) ([464d661](https://github.com/react-native-community/react-native-circleci-orb/commit/464d661))

# [1.4.0](https://github.com/react-native-community/react-native-circleci-orb/compare/v1.3.0...v1.4.0) (2020-01-04)


### Features

* **ios:** Added an `ios_build` job ([#30](https://github.com/react-native-community/react-native-circleci-orb/issues/30) by [@roni-castro](https://github.com/roni-castro)) ([b607782](https://github.com/react-native-community/react-native-circleci-orb/commit/b607782))

# [1.3.0](https://github.com/react-native-community/react-native-circleci-orb/compare/v1.2.1...v1.3.0) (2019-11-20)


### Bug Fixes

* **android:** Update gradle cache keys to match on save and restore ([#17](https://github.com/react-native-community/react-native-circleci-orb/issues/17)) ([6e52052](https://github.com/react-native-community/react-native-circleci-orb/commit/6e52052))
* **docs:** include the code repo link in the orb description ([6d97ca9](https://github.com/react-native-community/react-native-circleci-orb/commit/6d97ca9))
* Remove FBSimulatorControl ([#24](https://github.com/react-native-community/react-native-circleci-orb/issues/24) by [@compojoom](https://github.com/compojoom)) ([7c5b51a](https://github.com/react-native-community/react-native-circleci-orb/commit/7c5b51a))
* remove haxm the lack hardware acceleration support causes a crash ([9d0bb42](https://github.com/react-native-community/react-native-circleci-orb/commit/9d0bb42))
* remove haxm the lack hardware acceleration support causes a crash ([38ef88e](https://github.com/react-native-community/react-native-circleci-orb/commit/38ef88e)), closes [#3](https://github.com/react-native-community/react-native-circleci-orb/issues/3)


### Features

* Minor release ([5f401d7](https://github.com/react-native-community/react-native-circleci-orb/commit/5f401d7))

## [1.2.2](https://github.com/react-native-community/react-native-circleci-orb/compare/v1.2.1...v1.2.2) (2019-10-25)


### Bug Fixes

* remove haxm the lack hardware acceleration support causes a crash ([9d0bb42](https://github.com/react-native-community/react-native-circleci-orb/commit/9d0bb42))
* remove haxm the lack hardware acceleration support causes a crash ([38ef88e](https://github.com/react-native-community/react-native-circleci-orb/commit/38ef88e)), closes [#3](https://github.com/react-native-community/react-native-circleci-orb/issues/3)

## [1.2.1](https://github.com/react-native-community/react-native-circleci-orb/compare/v1.2.0...v1.2.1) (2019-06-03)


### Bug Fixes

* Use project_type in ios_build_and_test job ([25c7948](https://github.com/react-native-community/react-native-circleci-orb/commit/25c7948))

# [1.2.0](https://github.com/react-native-community/react-native-circleci-orb/compare/v1.1.2...v1.2.0) (2019-05-14)


### Features

* Allow the metro packager to be started from the test jobs ([68846df](https://github.com/react-native-community/react-native-circleci-orb/commit/68846df))

## [1.1.2](https://github.com/react-native-community/react-native-circleci-orb/compare/v1.1.1...v1.1.2) (2019-05-14)


### Bug Fixes

* Correct the Android java environment variables ([917129a](https://github.com/react-native-community/react-native-circleci-orb/commit/917129a))

## [1.1.1](https://github.com/react-native-community/react-native-circleci-orb/compare/v1.1.0...v1.1.1) (2019-05-14)


### Bug Fixes

* Increase the amount of memory for Android builds ([22e8279](https://github.com/react-native-community/react-native-circleci-orb/commit/22e8279))

# [1.1.0](https://github.com/react-native-community/react-native-circleci-orb/compare/v1.0.0...v1.1.0) (2019-04-25)


### Features

* Add parameters to configure the executors ([7c044cb](https://github.com/react-native-community/react-native-circleci-orb/commit/7c044cb))


================================================
FILE: LICENSE
================================================
MIT License

Copyright (c) 2019-present

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.


================================================
FILE: README.md
================================================
# React Native CircleCI Orb

[![CircleCI Orb][orb-version-badge]][orb-page]

A [CircleCI Orb](https://circleci.com/orbs/) to simplify testing your React Native app.

## Why?
Setting up CircleCI to test your React Native app correctly is hard. You need to consider using the correct machine type, installing the correct dependencies, running the correct commands, and correctly setting up caching to speed up builds. All of this is complicated and involves a lot of trial and error.

With this Orb we provide simple reusable building blocks which you can use to do the right thing easily.

## Overview
First, we recommend reading the [Using Orbs](https://circleci.com/docs/2.0/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.

## Setup
Firstly, as this is a 3rd Party Orb, you need to go into your organisations settings, press on "Security", and enable usage of 3rd Party Orbs.

You will also need to ensure that you have a MacOS plan enabled if you want to build and test your iOS app, or if you want to test your Android app. Open Source projects can contact CircleCI to ask them to enable it and private projects need to select a payment plan.

## Documentation
[You can read the full documentation here](https://circleci.com/orbs/registry/orb/react-native-community/react-native).

## Android

Add this task in your <example>/app/build.gradle

```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
      }
    }
  }
}
```

## Example

Here is a full example of how the Orb can be used in a CircleCI workflow to build and test a React Native app:

```yaml
# Orb support is from version >= 2.1
version: 2.1

# Make sure you use the latest version of the Orb!
orbs:
  rn: react-native-community/react-native@7.1.0

# Custom jobs which are not part of the Orb
jobs:
  checkout_code:
    executor: rn/linux_js
    steps:
      - checkout
      - persist_to_workspace:
          root: .
          paths: .
  analyse_js:
    executor: rn/linux_js
    steps:
      - attach_workspace:
          at: .
      - rn/yarn_install
      - run:
          name: Run ESLint
          command: yarn eslint
      - run:
          name: Flow
          command: yarn flow
      - run:
          name: Jest
          command: yarn jest

workflows:
  test:
    jobs:
      # Checkout the code and persist to the Workspace
      # Note: This is a job which is defined above and not part of the Orb
      - checkout_code

      # Analyze the Javascript using ESLint, Flow, and Jest
      # Note: This is a job which is defined above and not part of the Orb
      - analyse_js:
          requires:
            - checkout_code

      # Build the Android app in debug mode
      - rn/android_build:
          name: build_android_debug
          project_path: "android"
          build_type: debug
          requires:
            - analyse_js

      # Build and test the Android app in release mode
      # Note: We split these into seperate jobs because we can build the Android app on a Linux machine and preserve the expensive MacOS executor minutes for when it's required
      - rn/android_build:
          name: build_android_release
          project_path: "android"
          build_type: release
          requires:
            - analyse_js
      - rn/android_test:
          detox_configuration: "android.emu.release"
          requires:
            - build_android_release


      # Build the iOS app in release mode and do not run tests
      - rn/ios_build:
          name: build_ios_release
          project_path: ios/Example.xcodeproj
          device: "iPhone 11"
          build_configuration: Release
          scheme: Example
          requires:
            - analyse_js

      # Build and test the iOS app in release mode
      - rn/ios_build_and_test:
          project_path: "ios/Example.xcodeproj"
          device: "iPhone 11"
          build_configuration: "Release"
          scheme: "Example"
          detox_configuration: "ios.sim.release"
          requires:
            - analyse_js
```

This is what the final workflow will look like:

![Example React Native CircleCI Orb Workflow](.github/example_workflow.png)

## License
The Orb is released under the MIT license. For more information see [`LICENSE`](https://github.com/react-native-community/react-native-circleci-orb/blob/main/LICENSE).

[orb-version-badge]:https://badges.circleci.com/orbs/react-native-community/react-native.svg
[orb-page]:https://circleci.com/orbs/registry/orb/react-native-community/react-native


================================================
FILE: package.json
================================================
{
  "name": "@react-native-community/circleci-orb",
  "version": "8.0.1",
  "private": true,
  "description": "A CircleCI Orb which can be used to simplify building and testing React Native apps.",
  "scripts": {
    "semantic-release": "semantic-release"
  },
  "devDependencies": {
    "@semantic-release/changelog": "^6.0.3",
    "@semantic-release/git": "^10.0.1",
    "semantic-release": "^19.0.3"
  },
  "repository": {
    "type": "git",
    "url": "https://github.com/react-native-community/react-native-circleci-orb.git"
  },
  "author": "Matt Oakes <hello@mattoakes.net>",
  "license": "MIT",
  "bugs": {
    "url": "https://github.com/react-native-community/react-native-circleci-orb/issues"
  },
  "homepage": "https://github.com/react-native-community/react-native-circleci-orb#readme"
}


================================================
FILE: src/@orb.yml
================================================
version: 2.1

description: |
  Orb for building and testing React Native projects.

display:
  source_url: "https://github.com/react-native-community/react-native-circleci-orb"


================================================
FILE: src/commands/android_build.yml
================================================
description: Builds the Android app at the given path with the given build types. This should be run only after installing dependencies.

parameters:
  project_path:
    description: The path to the root of the Android project you want to build, relative to the root of the repository.
    type: string
    default: "./android"
  build_type:
    description: The build type to build. This is normally either "debug" or "release" but you may have custom build types configured for your app.
    type: string
    default: "debug"
  cache:
    description: Save and restore the caches? Defaults to true
    type: boolean
    default: true
  assemble_android_test:
    description: Configure the android tests to run. Defaults to assembleAndroidTest but you might want to set to app:assembleAndroidTest if that works for your project
    type: string
    default: assembleAndroidTest

steps:
  - when:
      condition: <<parameters.cache>>
      steps:
        - run:
            name: Create cache checksum files
            command: |
              mkdir -p ~/.tmp/checksumfiles
              find . -type f -name 'build.gradle' -not -path "*node_modules*" -exec cat {} + >> ~/.tmp/checksumfiles/build.gradle
              find . -type f -name 'settings.gradle' -not -path "*node_modules*" -exec cat {} + >> ~/.tmp/checksumfiles/settings.gradle

        - restore_cache:
            keys:
              - gradle-wrapper-{{ arch }}-{{ checksum "<<parameters.project_path>>/gradle/wrapper/gradle-wrapper.properties" }}-{{ .Environment.CACHE_VERSION }}

        - restore_cache:
            keys:
              - gradle-home-cache-{{ arch }}-{{ checksum "~/.tmp/checksumfiles/build.gradle" }}-{{ checksum "~/.tmp/checksumfiles/settings.gradle" }}-{{ .Environment.CACHE_VERSION }}

        - restore_cache:
            name: Restoring Gradle Build caches
            keys:
              - gradle-build-cache-{{ .Revision }}

  - run:
      name: Dispersing Gradle Build caches for restoring
      command: |
        [ -d ~/gradle-build-caches ] &&
          [ -n "$(ls -A ~/gradle-build-caches)" ] &&
          rm -rf ~/.gradle/caches/build-cache-* &&
          mkdir -p ~/.gradle/caches/ &&
          mv ~/gradle-build-caches/* ~/.gradle/caches/ || true

  # download and cache dependencies and Gradle
  - run:
      name: Downloading Gradle Dependencies
      command: "cd <<parameters.project_path>> && chmod +x gradlew && ./gradlew --max-workers 2 downloadDependencies"

  - when:
      condition: <<parameters.cache>>
      steps:
        - save_cache:
            name: Saving Gradle wrapper cache
            paths:
              - ~/.gradle/wrapper/
            key: gradle-wrapper-{{ arch }}-{{ checksum "<<parameters.project_path>>/gradle/wrapper/gradle-wrapper.properties" }}-{{ .Environment.CACHE_VERSION }}

        - save_cache:
            name: Saving Gradle home cache
            paths:
              - ~/.gradle/caches/
            key: gradle-home-cache-{{ arch }}-{{ checksum "~/.tmp/checksumfiles/build.gradle" }}-{{ checksum "~/.tmp/checksumfiles/settings.gradle" }}-{{ .Environment.CACHE_VERSION }}

  - run:
      name: Build Android APK
      command: "cd <<parameters.project_path>> && chmod +x gradlew && ./gradlew --build-cache --max-workers 2 --continue assemble<<parameters.build_type>> <<parameters.assemble_android_test>> -DtestBuildType=<<parameters.build_type>> --stacktrace"

  - when:
      condition: <<parameters.cache>>
      steps:
        - run:
            name: Collecting Gradle Build caches for saving
            command: |
              mkdir -p ~/gradle-build-caches
              [ -d ~/.gradle/caches ] &&
                [ -n "$(ls -Ad ~/.gradle/caches/build-cache-* 2>/dev/null)" ] &&
                rm -rf ~/gradle-build-caches/* &&
                mv ~/.gradle/caches/build-cache-* ~/gradle-build-caches || true
            when: always

        - save_cache:
            name: Saving Gradle Build caches
            paths:
              - ~/gradle-build-caches
            key: gradle-build-cache-{{ .Revision }}
            when: always


================================================
FILE: src/commands/android_emulator_start.yml
================================================
description: Installs and starts an Android emulator with the given version and name.

parameters:
  device_name:
    description: The name of the AVD. You use this name to tell which device to run tests on.
    type: string
    default: "TestingAVD"
  platform_version:
    description: The version of android to run on the emulator. Usually in the form of "android-28".
    type: string
    default: "android-28"
  build_tools_version:
    description: The version of the Android build tools to install.
    type: string
    default: "28.0.3"
  logcat_grep:
    description: ADB logs will be shown in the "Start Android Emulator" commands, but we filter it using grep to avoid noise. You can specify additional strings to grep for. Make sure you escape special characters.
    type: string
    default: "com.reactnativecommunity"

steps:
  - run:
      name: Install Android Emulator
      shell: /bin/bash -e
      command: |
        yes | sdkmanager "platform-tools" "tools" >/dev/null
        yes | sdkmanager "platforms;<<parameters.platform_version>>" "system-images;<<parameters.platform_version>>;default;x86_64" >/dev/null
        yes | sdkmanager "emulator" --channel=3 >/dev/null
        yes | sdkmanager "build-tools;<<parameters.build_tools_version>>" >/dev/null
        yes | sdkmanager --licenses >/dev/null
        yes | sdkmanager --list

  # to force ssh key generation for emulators
  - run:
      name: ADB Start Stop
      command: |
        adb start-server
        adb devices
        adb kill-server
        ls -la ~/.android

  - run:
      name: Create Android Emulator
      command:
        avdmanager create avd --force --name <<parameters.device_name>> --package
        "system-images;<<parameters.platform_version>>;default;x86_64" --tag
        default --device pixel

  - run:
      name: Start Android Emulator (background)
      command: |
        $ANDROID_HOME/emulator/emulator @<<parameters.device_name>> -version
        $ANDROID_HOME/emulator/emulator @<<parameters.device_name>> -cores 1 -gpu auto -accel on -memory 1024 -no-audio -no-snapshot -no-boot-anim -no-window -logcat *:W | grep -i 'ReactNative\|<<parameters.logcat_grep>>'
      background: true

  - run:
      name: Wait for AVD to be ready
      no_output_timeout: "5m"
      command: |
        export BOOT=""
        echo "Waiting for AVD to finish booting"
        export PATH=$(dirname $(dirname $(command -v android)))/platform-tools:$PATH
        until [[ "$BOOT" =~ "1" ]]; do
          sleep 5
          export BOOT=$(adb -e shell getprop sys.boot_completed 2>&1)
        done
        sleep 15
        adb shell settings put global window_animation_scale 0
        adb shell settings put global transition_animation_scale 0
        adb shell settings put global animator_duration_scale 0
        echo "Android Virtual Device is now ready."


================================================
FILE: src/commands/bundle.yml
================================================
description: Bundles all JS files.

parameters:
  platform:
    description: The platform to build for. Usually one of "ios" or "android".
    type: string
  bundle_output:
    description: The location to output the bundle to.
    type: string
  asset_dest:
    description: The location to output assets to.
    type: string
  entry_file:
    description: The entry file for the bundle. Defaults to "index.js".
    type: string
    default: "index.js"
  dev:
    description: If we should bundle in dev mode. Defaults to "false"
    type: boolean
    default: false

steps:
  - run:
      name: Bundle React Native JS
      command: react-native bundle --platform <<parameters.platform>> --bundle-output <<parameters.bundle_output>> --assets-dest <<parameters.asset_dest>> --entry-file <<parameters.entry_file>> --dev <<parameters.dev>>


================================================
FILE: src/commands/detox_build.yml
================================================
description: Builds the app with the given Detox configuration, as specified in package.json.

parameters:
  configuration:
    description: The Detox configuration to build.
    type: string

steps:
  - run:
      name: Detox Build
      command: detox build -c <<parameters.configuration>>


================================================
FILE: src/commands/detox_test.yml
================================================
description: Tests the app with the given Detox configuration, as specified in package.json.

parameters:
  configuration:
    description: The Detox configuration to test.
    type: string
  loglevel:
    description: The Detox logging level to use. Must be one of "fatal", "error", "warn", "info", "verbose", or "trace".
    type: enum
    enum: ["fatal", "error", "warn", "info", "verbose", "trace"]
    default: warn

steps:
  - run:
      name: Detox Test
      command: detox test -c <<parameters.configuration>> -l <<parameters.loglevel>> --headless


================================================
FILE: src/commands/ios_build.yml
================================================
description: Builds the iOS app at the given path with the given build scheme and configuration. This should be run only after installing NPM dependencies.

parameters:
  project_type:
    description: If the iOS app is built using a project file (*.xcodeproj) or a workspace.
    type: enum
    enum: ["project", "workspace"]
    default: "project"
  project_path:
    description: The path to the Xcode project (*.xcodeproj) or the Xcode workspace (*.xcworkspace) that you want to build, relative to the root of the repository.
    type: string
  build_configuration:
    description: The build configuration to use. This is normally either "Debug" or "Release" but you may have custom build configuration configured for your app.
    type: string
    default: "Debug"
  derived_data_path:
    description: The path to the directory to place the derived data, relative to the root of the repository.
    type: string
    default: "ios/build"
  device:
    description: The name of device you want to build for.
    type: string
    default: "iPhone 11"
  device_id:
    description: UUID of device you want to build for.
    type: string
    default: ""
  device_os:
    description: OS of device you want to build for, e.g 18.5.
    type: string
    default: ""
  scheme:
    description: The scheme to use.
    type: string
  cache:
    description: Save and restore the build cache? Defaults to true
    type: boolean
    default: true

steps:
  - when:
      condition: <<parameters.cache>>
      steps:
        - restore_cache:
            name: Restoring iOS Build caches
            keys:
              - ios-build-cache-{{ arch }}-{{ checksum "~/.tmp/checksumfiles/package.json" }}-{{ .Environment.CACHE_VERSION }}

  - run:
      name: Build iOS App
      command: |
        DESTINATION="platform=iOS Simulator,name=<<parameters.device>>"
        if [ "<<parameters.device_id>>" != "" ]; then
          DESTINATION="${DESTINATION},id=<<parameters.device_id>>"
        fi
        if [ "<<parameters.device_os>>" != "" ]; then
          DESTINATION="${DESTINATION},OS=<<parameters.device_os>>"
        fi
        export RCT_NO_LAUNCH_PACKAGER=true
        xcodebuild -<<parameters.project_type>> <<parameters.project_path>> -destination "${DESTINATION}" -scheme '<<parameters.scheme>>' -parallelizeTargets -configuration <<parameters.build_configuration>> -derivedDataPath <<parameters.derived_data_path>> -UseModernBuildSystem=YES | xcpretty -k

  - when:
      condition: <<parameters.cache>>
      steps:
        - save_cache:
            name: Saving iOS Build Cache
            paths:
              - <<parameters.derived_data_path>>/Build
            key: ios-build-cache-{{ arch }}-{{ checksum "~/.tmp/checksumfiles/package.json" }}-{{ .Environment.CACHE_VERSION }}
            when: always


================================================
FILE: src/commands/ios_simulator_start.yml
================================================
description: Starts an iOS simulator with the given name.

parameters:
  device:
    description: The type of device you want to start.
    type: string
    default: "iPhone 11"
  background:
    default: true
    description: Should ios simulator boot in background?
    type: boolean

steps:
  - run:
      name: Start iOS simulator (background)
      background: <<parameters.background>>
      command: xcrun simctl boot "<<parameters.device>>" || true


================================================
FILE: src/commands/metro_start.yml
================================================
description: Starts the Metro packager.

steps:
  - run:
      name: Start Metro Packager (Background)
      background: true
      command: react-native start


================================================
FILE: src/commands/ndk_update.yml
================================================
description: Update Android NDK

parameters:
  version:
    type: string
    default: 22.1.7171670

steps:
  - run:
      name: Update Android NDK
      command: sdkmanager "ndk;<<parameters.version>>"


================================================
FILE: src/commands/pod_install.yml
================================================
description: install pods

# note: do not use the --project-directory pod param because many example
# projects in the rn community repos rely on pod install to be run from ios directory
# instead cd into the folder and then back

parameters:
  pod_install_directory:
    type: string
    default: "ios"
    description: The location of the "ios" directory
  pod_install_command:
    type: string
    default: "pod install"
    description: The command to run to install pods
  cache:
    description: Save and restore the cache? Defaults to true
    type: boolean
    default: true

steps:
  - when:
      condition: <<parameters.cache>>
      steps:
        - restore_cache:
            keys:
              - '{{ .Environment.CACHE_VERSION }}-cache-pods-{{ checksum "<<parameters.pod_install_directory>>/Podfile.lock" }}'
  - run:
      name: Install CocoaPods
      command: |
        cd <<parameters.pod_install_directory>> && eval <<parameters.pod_install_command>> && cd -
  - when:
      condition: <<parameters.cache>>
      steps:
        - save_cache:
            paths:
              - <<parameters.pod_install_directory>>/Pods
            key: '{{ .Environment.CACHE_VERSION }}-cache-pods-{{ checksum "<<parameters.pod_install_directory>>/Podfile.lock" }}'


================================================
FILE: src/commands/setup_macos_executor.yml
================================================
description: Installs the required packages to build and test Android and iOS applications on the MacOS executor. You need to run this before running any other command on those executors.

parameters:
  node_version:
    description: The version of Node to use. This can be either a major version ("8"), a major and minor ("8.4"), or a fully qualified version ("8.4.1").
    type: string
    default: "16"
  homebrew_cache:
    description: Should we cache after brew install? Defaults to true
    type: boolean
    default: true
  homebrew_update:
    description: Should we run brew update? Defaults to true
    type: boolean
    default: true
  android:
    description: Should we set up the Android build environment? Defaults to true
    type: boolean
    default: true
  detox:
    description: Should we set up Detox? Defaults to true
    type: boolean
    default: true

steps:
  - run:
      name: Configure Environment Variables
      command: |
        echo 'export PATH="$PATH:/usr/local/opt/node@<<parameters.node_version>>/bin:~/.yarn/bin:~/project/node_modules/.bin:~/project/example/node_modules/.bin"' >> $BASH_ENV
        echo 'export ANDROID_HOME="/usr/local/share/android-commandlinetools"' >> $BASH_ENV
        echo 'export ANDROID_SDK_ROOT="/usr/local/share/android-commandlinetools"' >> $BASH_ENV
        echo 'export PATH="$ANDROID_SDK_ROOT/emulator:$ANDROID_SDK_ROOT/tools:$ANDROID_SDK_ROOT/platform-tools:$PATH"' >> $BASH_ENV
        echo 'export QEMU_AUDIO_DRV=none' >> $BASH_ENV
        echo 'export JAVA_HOME=$(/usr/libexec/java_home)' >> $BASH_ENV
        source $BASH_ENV

  - when:
      condition: <<parameters.homebrew_cache>>
      steps:
        - restore_cache:
            key: brew-cache-{{ arch }}-{{ .Environment.CACHE_VERSION }}

  - run:
      name: Install node@<<parameters.node_version>>
      # after `curl`, bashrc contains the script to load nvm, we need to source it to use it
      command: |
        set +e
        curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.35.3/install.sh | bash
        echo 'export NVM_DIR=$HOME/.nvm' >> $BASH_ENV
        echo 'source $NVM_DIR/nvm.sh' >> $BASH_ENV
        source ~/.bashrc
        command -v nvm
        nvm install <<parameters.node_version>>
        nvm alias default <<parameters.node_version>>
  - run:
      name: Verify node version
      command: node --version

  - when:
      condition: <<parameters.homebrew_update>>
      steps:
        - run:
            name: Update brew
            command: brew update >/dev/null

  - when:
      condition: <<parameters.android>>
      steps:
        run:
          name: Configure Android Build Environment
          command: |
            HOMEBREW_NO_AUTO_UPDATE=1 brew tap homebrew/cask >/dev/null
            HOMEBREW_NO_AUTO_UPDATE=1 brew install android-commandlinetools >/dev/null

  - when:
      condition: <<parameters.detox>>
      steps:
        run:
          name: Configure Detox Environment
          command: |
            HOMEBREW_NO_AUTO_UPDATE=1 brew tap wix/brew >/dev/null
            HOMEBREW_NO_AUTO_UPDATE=1 brew install applesimutils >/dev/null

  - when:
      condition: <<parameters.homebrew_cache>>
      steps:
        - save_cache:
            paths:
              - ~/Library/Caches/Homebrew
            key: brew-cache-{{ arch }}-{{ .Environment.CACHE_VERSION }}


================================================
FILE: src/commands/yarn_install.yml
================================================
description: Install Javascript dependencies using Yarn. This command correctly configures the cache for any number of package.json and yarn.lock files.

parameters:
  cache:
    description: Save and restore the build cache? Defaults to true
    type: boolean
    default: true
  cache_folder:
    description: The path to the yarn cache folder.  Defaults to /tmp/yarn
    type: string
    default: "/tmp/yarn"
  yarn_install_directory:
    description: The working directory to run install at. Defaults to yarn's current working directory
    type: string
    default: ""

steps:
  - when:
      condition: <<parameters.cache>>
      steps:
        - run:
            name: Create cache checksum file
            command: |
              mkdir -p ~/.tmp/checksumfiles
              find . -type f -name 'package.json' -not -path "*node_modules*" -exec cat {} + >> ~/.tmp/checksumfiles/package.json
              find . -type f -name 'yarn.lock' -not -path "*node_modules*" -exec cat {} + >> ~/.tmp/checksumfiles/yarn.lock
        - restore_cache:
            keys:
              - yarn-cache-{{ arch }}-{{ checksum "~/.tmp/checksumfiles/package.json" }}-{{ checksum "~/.tmp/checksumfiles/yarn.lock" }}-{{ .Environment.CACHE_VERSION }}
  - when:
      condition:
        equal: ["", <<parameters.yarn_install_directory>>]
      steps:
        - run:
            name: Yarn Install
            command: "yarn install --frozen-lockfile --non-interactive --cache-folder <<parameters.cache_folder>>"
  - unless:
      condition:
        equal: ["", <<parameters.yarn_install_directory>>]
      steps:
        - run:
            name: Yarn Install (<<parameters.yarn_install_directory>>)
            command: "yarn --cwd <<parameters.yarn_install_directory>> install --frozen-lockfile --non-interactive --cache-folder <<parameters.cache_folder>>"
  - when:
      condition: <<parameters.cache>>
      steps:
        - save_cache:
            paths:
              - <<parameters.cache_folder>>
            key: yarn-cache-{{ arch }}-{{ checksum "~/.tmp/checksumfiles/package.json" }}-{{ checksum "~/.tmp/checksumfiles/yarn.lock" }}-{{ .Environment.CACHE_VERSION }}


================================================
FILE: src/examples/android.yml
================================================
description: 'An example of how to build, test, and release the Android app'
usage:
  # Orb support is from version >= 2.1
  version: 2.1

  # Make sure you use the latest version of the Orb
  orbs:
    rn: react-native-community/react-native@1.0.0

  # Custom jobs which are not part of the Orb
  jobs:
    # A job to checkout and persist the code to the workspace
    checkout_code:
      executor: rn/linux_js
      steps:
        - checkout
        - persist_to_workspace:
            root: .
            paths: .
    # A job to test the JavaScript part of the app
    analyse_js:
      executor: rn/linux_js
      steps:
        - attach_workspace:
            at: .
        - rn/yarn_install
        - run:
            name: Run ESLint
            command: yarn eslint
        - run:
            name: Flow
            command: yarn flow
        - run:
            name: Jest
            command: yarn jest
    # A job to release the app through Fastlane
    fastlane_release:
      executor: rn/linux_js
      steps:
        - attach_workspace:
            at: .
        - rn/yarn_install
        - run:
            name: Run Fastlane
            # Your Fastlane command goes here
            command: bundle exec fastlane android release

  workflows:
    test:
      jobs:
        # Checkout the code and persist to the Workspace
        # Note: This is a job which is defined above and not part of the Orb
        - checkout_code

        # Analyze the Javascript using ESLint, Flow, and Jest
        # Note: This is a job which is defined above and not part of the Orb
        - analyse_js:
            requires:
              - checkout_code

        # Build and test the Android app in release mode
        # Note: We split these into seperate jobs because we can build the Android app on a Linux machine and preserve the expensive MacOS executor minutes for when it's required
        - rn/android_build:
            build_type: release
            requires:
              - analyse_js
        - rn/android_test:
            requires:
              - rn/android_build

        # Release the app using our Fastlane job
        # Note: This is a job which is defined above and not part of the Orb
        - fastlane_release:
            requires:
              - rn/android_test


================================================
FILE: src/examples/full.yml
================================================
description: 'A full setup with a Javascript test job, leading to Detox build and test jobs, and finally releasing the apps using a Fastlane command'
usage:
  # Orb support is from version >= 2.1
  version: 2.1

  # Make sure you use the latest version of the Orb
  orbs:
    rn: react-native-community/react-native@1.0.0

  # Custom jobs which are not part of the Orb
  jobs:
    checkout_code:
      executor:
        name: rn/linux_js
        node_version: '16'
      steps:
        - checkout
        - persist_to_workspace:
            root: .
            paths: .
    analyse_js:
      executor: rn/linux_js
      steps:
        - attach_workspace:
            at: .
        - rn/yarn_install
        - run:
            name: Run ESLint
            command: yarn eslint
        - run:
            name: Flow
            command: yarn flow
        - run:
            name: Jest
            command: yarn jest
    fastlane_android_release:
      executor: rn/linux_js
      steps:
        - attach_workspace:
            at: .
        - rn/yarn_install
        - run:
            name: Run Fastlane
            command: echo # Your Fastlane command goes here
    fastlane_ios_release:
      executor: rn/linux_js
      steps:
        - attach_workspace:
            at: .
        - rn/yarn_install
        - run:
            name: Run Fastlane
            command: echo 1 # Your Fastlane command goes here

  workflows:
    test:
      jobs:
        # Checkout the code and persist to the Workspace
        # Note: This is a job which is defined above and not part of the Orb
        - checkout_code

        # Analyze the Javascript using ESLint, Flow, and Jest
        # Note: This is a job which is defined above and not part of the Orb
        - analyse_js:
            requires:
              - checkout_code

        # Build the Android app in debug mode
        - rn/android_build:
            name: build_android_debug
            project_path: "android"
            build_type: debug
            requires:
              - analyse_js

        # Build and test the Android app in release mode
        # Note: We split these into seperate jobs because we can build the Android app on a Linux machine and preserve the expensive MacOS executor minutes for when it's required
        - rn/android_build:
            name: build_android_release
            project_path: "android"
            build_type: release
            requires:
              - analyse_js
        - rn/android_test:
            detox_configuration: "android.emu.release"
            requires:
              - build_android_release

        # Build the iOS app in release mode and do not run tests
        - rn/ios_build:
            name: build_ios_release
            node_version: '12'
            project_path: ios/Example.xcodeproj
            device: "iPhone 11"
            build_configuration: Release
            scheme: Example
            requires:
              - analyse_js

        # Build and test the iOS app in release mode
        - rn/ios_build_and_test:
            node_version: '12'
            project_path: "ios/Example.xcodeproj"
            device: "iPhone 11"
            build_configuration: "Release"
            scheme: "Example"
            detox_configuration: "ios.sim.release"
            requires:
              - analyse_js

        # Release the app on Android & iOS
        - fastlane_android_release:
            requires:
              - rn/android_test
        - fastlane_ios_release:
            requires:
              - rn/ios_build_and_test


================================================
FILE: src/examples/ios.yml
================================================
description: 'An example of how to build, test, and release the iOS app'
usage:
  # Orb support is from version >= 2.1
  version: 2.1

  # Make sure you use the latest version of the Orb
  orbs:
    rn: react-native-community/react-native@1.0.0

  # Custom jobs which are not part of the Orb
  jobs:
    # A job to checkout and persist the code to the workspace
    checkout_code:
      executor: rn/linux_js
      steps:
        - checkout
        - persist_to_workspace:
            root: .
            paths: .
    # A job to test the JavaScript part of the app
    analyse_js:
      executor: rn/linux_js
      steps:
        - attach_workspace:
            at: .
        - rn/yarn_install
        - run:
            name: Run ESLint
            command: yarn eslint
        - run:
            name: Flow
            command: yarn flow
        - run:
            name: Jest
            command: yarn jest
    # A job to release the app through Fastlane
    fastlane_release:
      executor: rn/linux_js
      steps:
        - attach_workspace:
            at: .
        - rn/yarn_install
        - run:
            name: Run Fastlane
            # Your Fastlane command goes here
            command: bundle exec fastlane ios release

  workflows:
    test:
      jobs:
        # Checkout the code and persist to the Workspace
        # Note: This is a job which is defined above and not part of the Orb
        - checkout_code

        # Analyze the Javascript using ESLint, Flow, and Jest
        # Note: This is a job which is defined above and not part of the Orb
        - analyse_js:
            requires:
              - checkout_code

        # Build the iOS app in release mode and do not run tests
        - rn/ios_build:
            name: build_ios_release
            project_path: ios/Example.xcodeproj
            device: "iPhone 11"
            build_configuration: Release
            scheme: Example
            requires:
              - analyse_js

        # Build and test the iOS app in release mode
        - rn/ios_build_and_test:
            project_path: "ios/Example.xcodeproj"
            device: "iPhone 11"
            build_configuration: "Release"
            scheme: "Example"
            detox_configuration: "ios.sim.release"
            requires:
              - analyse_js

        # Release the app using our Fastlane job
        # Note: This is a job which is defined above and not part of the Orb
        - fastlane_release:
            requires:
              - rn/ios_build_and_test


================================================
FILE: src/executors/linux_android.yml
================================================
parameters:
  gradle_options:
    description: Gradle command options. Note that setting this will override the default options so you might need to supply those as well.
    type: string
    default: '-Xmx2014m -Dorg.gradle.daemon=false -Dorg.gradle.jvmargs="-XX:+UnlockExperimentalVMOptions -XX:+HeapDumpOnOutOfMemoryError"'
  build_image_version:
    description: React Native Android build image version. For available veresions, see https://hub.docker.com/r/reactnativecommunity/react-native-android/tags
    type: string
    default: '5.1'
  resource_class:
    description: Changes the resource class of the executor. Requires a support request to enable the resource_class parameter. See https://circleci.com/docs/2.0/configuration-reference/#resource_class
    type: string
    default: medium
docker:
  - image: reactnativecommunity/react-native-android:<<parameters.build_image_version>>
resource_class: <<parameters.resource_class>>
environment:
  - GRADLE_OPTS: <<parameters.gradle_options>>


================================================
FILE: src/executors/linux_js.yml
================================================
parameters:
  node_version:
    description: The version of Node to use. This can be a full SemVer point release (such as 16.15.2), or just the minor release (such as 18.2), or a version alias. See https://circleci.com/developer/images/image/cimg/node#image-tags
    type: string
    default: '16.15'
  resource_class:
    description: Changes the resource class of the executor. Requires a support request to enable the resource_class parameter. See https://circleci.com/docs/2.0/configuration-reference/#resource_class
    type: string
    default: medium
docker:
  - image: cimg/node:<<parameters.node_version>>
resource_class: <<parameters.resource_class>>


================================================
FILE: src/executors/macos.yml
================================================
parameters:
  xcode_version:
    description: The version of Xcode to use. See here for the list of supported versions https://circleci.com/docs/2.0/testing-ios/#supported-xcode-versions
    type: string
    default: "12.5.1"
  resource_class:
    description: Changes the resource class of the executor. Requires a support request to enable the resource_class parameter. See https://circleci.com/docs/2.0/configuration-reference/#resource_class
    type: string
    default: medium
macos:
  xcode: <<parameters.xcode_version>>
resource_class: <<parameters.resource_class>>


================================================
FILE: src/jobs/android_build.yml
================================================
description: Builds the Android app at the given path with the given build types.

parameters:
  # For this job
  checkout:
    description: Boolean for whether or not to checkout as a first step. Default is false.
    type: boolean
    default: false
  attach_workspace:
    description: Boolean for whether or not to attach to an existing workspace. Default is true.
    type: boolean
    default: true
  workspace_root:
    description: Workspace root path that is either an absolute path or a path relative to the working directory. Defaults to '.' (the working directory).
    type: string
    default: .
  persist_to_workspace:
    description: Should this job persist files to a workspace? Defaults to true
    type: boolean
    default: true
  store_artifacts:
    description: Store this job store files as job artifacts? Defaults to true
    type: boolean
    default: true
  yarn_cache:
    description: Should we cache after yarn install? Defaults to true
    type: boolean
    default: true
  on_after_initialize:
    description: A custom command to run right after yarn install.
    type: string
    default: ""
  # For the build command
  project_path:
    description: The path to the root of the Android project you want to build, relative to the root of the repository.
    type: string
    default: "./android"
  build_type:
    description: The build type to build. This is normally either "debug" or "release" but you may have custom build types configured for your app.
    type: string
    default: "debug"
  build_cache:
    description: Should we cache after Gradle build? Defaults to true
    type: boolean
    default: true
  assemble_android_test:
    description: Configure the android tests to run. Defaults to assembleAndroidTest
    type: string
    default: assembleAndroidTest
  gradle_options:
    description: Gradle command options. Note that setting this will override the default options so you might need to supply those as well.
    type: string
    default: '-Xmx2014m -Dorg.gradle.daemon=false -Dorg.gradle.jvmargs="-XX:+UnlockExperimentalVMOptions -XX:+HeapDumpOnOutOfMemoryError"'
  build_image_version:
    description: React Native Android build image version. For available veresions, see https://hub.docker.com/r/reactnativecommunity/react-native-android/tags
    type: string
    default: '5.1'
  resource_class:
    description: Changes the resource class of the executor. Requires a support request to enable the resource_class parameter. See https://circleci.com/docs/2.0/configuration-reference/#resource_class
    type: string
    default: medium

executor:
  name: linux_android
  gradle_options: <<parameters.gradle_options>>
  build_image_version: <<parameters.build_image_version>>
  resource_class: <<parameters.resource_class>>

steps:
  - when:
      condition: <<parameters.checkout>>
      steps:
        - checkout
  - when:
      condition: <<parameters.attach_workspace>>
      steps:
        - attach_workspace:
            at: <<parameters.workspace_root>>
  - yarn_install:
      cache: <<parameters.yarn_cache>>
  - when:
      condition: <<parameters.on_after_initialize>>
      steps:
        - run:
            name: "on_after_initialize"
            command: <<parameters.on_after_initialize>>
  - android_build:
      project_path: <<parameters.project_path>>
      build_type: <<parameters.build_type>>
      cache: <<parameters.build_cache>>
      assemble_android_test: <<parameters.assemble_android_test>>
  - when:
      condition: <<parameters.persist_to_workspace>>
      steps:
        - persist_to_workspace:
            root: .
            paths:
              - <<parameters.project_path>>/app/build/outputs/apk
  - when:
      condition: <<parameters.store_artifacts>>
      steps:
        - store_artifacts:
            path: <<parameters.project_path>>/app/build/outputs/apk


================================================
FILE: src/jobs/android_test.yml
================================================
description: Tests the Android app on the given device, with the given Detox configuration. You should have already built the correct Android APK (including the androidTest APK) and have both persisted to the worksapce.

parameters:
  # For this job
  workspace_root:
    description: Workspace root path that is either an absolute path or a path relative to the working directory. Defaults to '.' (the working directory).
    type: string
    default: .
  start_metro:
    description: If we should start the Metro packager in the background for this job.
    type: boolean
    default: false
  yarn_cache:
    description: Should we cache after yarn install? Defaults to true
    type: boolean
    default: true
  # For the start emulator command
  device_name:
    description: The name of the AVD. You use this name to tell which device to run tests on. Defaults to 'TestingAVD'.
    type: string
    default: "TestingAVD"
  platform_version:
    description: The version of android to run on the emulator. Defaults to 'android-28'.
    type: string
    default: "android-28"
  build_tools_version:
    description: The version of the Android build tools to install. Defaults to '28.0.3'.
    type: string
    default: "28.0.3"
  logcat_grep:
    description: ADB logs will be shown in the "Start Android Emulator" commands, but we filter it using grep to avoid noise. You can specify additional strings to grep for. Make sure you escape special characters. Defaults to 'com.reactnativecommunity'.
    type: string
    default: "com.reactnativecommunity"
  # For the detox command
  detox_configuration:
    description: The Detox configuration to test. Defaults to 'android.emu.release'.
    type: string
    default: "android.emu.release"
  detox_loglevel:
    description: The Detox logging level to use. Must be one of "fatal", "error", "warn", "info", "verbose", or "trace".
    type: enum
    enum: ["fatal", "error", "warn", "info", "verbose", "trace"]
    default: warn
  store_artifact_path:
    description: Stores detox artifacts at CircleCI
    type: string
    default: ""
  should_on_after_initialize:
    description: Set this to true if you want to run a custom shell command right after yarn install. Provide the command in on_after_initialize command.
    type: boolean
    default: false
  on_after_initialize:
    description: A custom command to run right after yarn install.
    type: string
    default: ""
  should_on_after_emulator_start:
    description: Set this to true if you want to run a custom shell command right after the android emulator starts. Provide the command in on_after_emulator_start command.
    type: boolean
    default: false
  on_after_emulator_start:
    description: A custom command to run right after the android emulator starts.
    type: string
    default: ""
  # For macos executor
  node_version:
    description: The version of Node to use. This can be either a major version ("8"), a major and minor ("8.4"), or a fully qualified version ("8.4.1").
    type: string
    default: "16"
  homebrew_cache:
    description: Should we cache after brew install? Defaults to true
    type: boolean
    default: true
  homebrew_update:
    description: Should we run brew update? Defaults to true
    type: boolean
    default: true
  xcode_version:
    description: The version of Xcode to use. See here for the list of supported versions https://circleci.com/docs/2.0/testing-ios/#supported-xcode-versions
    type: string
    default: "12.5.1"
  resource_class:
    description: Changes the resource class of the executor. Requires a support request to enable the resource_class parameter. See https://circleci.com/docs/2.0/configuration-reference/#resource_class
    type: string
    default: medium

executor:
  name: macos
  xcode_version: <<parameters.xcode_version>>
  resource_class: <<parameters.resource_class>>

steps:
  - attach_workspace:
      at: <<parameters.workspace_root>>
  - setup_macos_executor:
      node_version: <<parameters.node_version>>
      homebrew_cache: <<parameters.homebrew_cache>>
      homebrew_update: <<parameters.homebrew_update>>
  - yarn_install:
      cache: <<parameters.yarn_cache>>
  - when:
      condition: <<parameters.should_on_after_initialize>>
      steps:
        - run:
            name: "on_after_initialize"
            command: <<parameters.on_after_initialize>>
  - when:
      condition: <<parameters.start_metro>>
      steps:
        - metro_start
  - android_emulator_start:
      device_name: <<parameters.device_name>>
      platform_version: <<parameters.platform_version>>
      build_tools_version: <<parameters.build_tools_version>>
      logcat_grep: <<parameters.logcat_grep>>
  - when:
      condition: <<parameters.should_on_after_emulator_start>>
      steps:
        - run:
            name: "on_after_emulator_start"
            command: <<parameters.on_after_emulator_start>>
  - detox_test:
      configuration: <<parameters.detox_configuration>>
      loglevel: <<parameters.detox_loglevel>>
  - when:
      condition: <<parameters.store_artifact_path>>
      steps:
        - store_artifacts:
            path: <<parameters.store_artifact_path>>


================================================
FILE: src/jobs/ios_build.yml
================================================
description: Builds the iOS app at the given path with the given build scheme

parameters:
  # For this job
  checkout:
    description: Boolean for whether or not to checkout as a first step. Default is false.
    type: boolean
    default: false
  attach_workspace:
    description: Boolean for whether or not to attach to an existing workspace. Default is true.
    type: boolean
    default: true
  workspace_root:
    description: Workspace root path that is either an absolute path or a path relative to the working directory. Defaults to '.' (the working directory).
    type: string
    default: .
  start_metro:
    description: If we should start the Metro packager in the background for this job.
    type: boolean
    default: false
  pod_install_directory:
    type: string
    default: ""
    description: The location of the "ios" directory for `pod install`. Will skip `pod install` if missing.
  pod_cache:
    description: Save and restore the CocoaPods cache? Defaults to true
    type: boolean
    default: true
  yarn_cache:
    description: Should we cache after yarn install? Defaults to true
    type: boolean
    default: true
  yarn_cache_folder:
    description: The path to the yarn cache folder
    type: string
    default: "/tmp/yarn"
  # For the iOS build command
  project_type:
    description: If the iOS app is built using a project file (*.xcodeproj) or a workspace.
    type: enum
    enum: ["project", "workspace"]
    default: "project"
  project_path:
    description: The path to the Xcode project (*.xcodeproj) or the Xcode workspace (*.xcworkspace) that you want to build, relative to the root of the repository.
    type: string
  build_configuration:
    description: The build configuration to use. This is normally either "Debug" or "Release" but you may have custom build configuration configured for your app.
    type: string
    default: "Debug"
  derived_data_path:
    description: The path to the directory to place the derived data, relative to the root of the repository.
    type: string
    default: "ios/build"
  device:
    description: The type of device you want to build for.
    type: string
    default: "iPhone 11"
  device_id:
    description: UUID of device you want to build for.
    type: string
    default: ""
  device_os:
    description: OS of device you want to build for, e.g 18.5.
    type: string
    default: ""
  scheme:
    description: The scheme to use.
    type: string
  on_after_initialize:
    description: A custom command to run right after yarn install.
    type: string
    default: ""
  xcodebuild_cache:
    description: Should we cache after Xcode build? Defaults to true
    type: boolean
    default: true
  # For macos executor
  node_version:
    description: The version of Node to use. This can be either a major version ("8"), a major and minor ("8.4"), or a fully qualified version ("8.4.1").
    type: string
    default: "16"
  homebrew_cache:
    description: Should we cache after brew install? Defaults to true
    type: boolean
    default: true
  homebrew_update:
    description: Should we run brew update? Defaults to true
    type: boolean
    default: true
  xcode_version:
    description: The version of Xcode to use. See here for the list of supported versions https://circleci.com/docs/2.0/testing-ios/#supported-xcode-versions
    type: string
    default: "12.5.1"
  resource_class:
    description: Changes the resource class of the executor. Requires a support request to enable the resource_class parameter. See https://circleci.com/docs/2.0/configuration-reference/#resource_class
    type: string
    default: medium

executor:
  name: macos
  xcode_version: <<parameters.xcode_version>>
  resource_class: <<parameters.resource_class>>

steps:
  - when:
      condition: <<parameters.checkout>>
      steps:
        - checkout
  - when:
      condition: <<parameters.attach_workspace>>
      steps:
        - attach_workspace:
            at: <<parameters.workspace_root>>
  - setup_macos_executor:
      node_version: <<parameters.node_version>>
      homebrew_cache: <<parameters.homebrew_cache>>
      homebrew_update: <<parameters.homebrew_update>>
      android: false
      detox: false
  - yarn_install:
      cache: <<parameters.yarn_cache>>
      cache_folder: <<parameters.yarn_cache_folder>>
  - when:
      condition: <<parameters.on_after_initialize>>
      steps:
        - run:
            name: "on_after_initialize"
            command: <<parameters.on_after_initialize>>
  - when:
      condition: <<parameters.start_metro>>
      steps:
        - metro_start
  - when:
      condition: <<parameters.pod_install_directory>>
      steps:
        - pod_install:
            pod_install_directory: <<parameters.pod_install_directory>>
            cache: <<parameters.pod_cache>>
  - ios_build:
      project_path: <<parameters.project_path>>
      derived_data_path: <<parameters.derived_data_path>>
      device: <<parameters.device>>
      device_id: <<parameters.device_id>>
      device_os: <<parameters.device_os>>
      build_configuration: <<parameters.build_configuration>>
      scheme: <<parameters.scheme>>
      project_type: <<parameters.project_type>>
      cache: <<parameters.xcodebuild_cache>>


================================================
FILE: src/jobs/ios_build_and_test.yml
================================================
description: Builds the iOS app at the given path with the given build scheme and configuration and then runs the tests with the Detox configuration given.

parameters:
  # For this job
  checkout:
    description: Boolean for whether or not to checkout as a first step. Default is false.
    type: boolean
    default: false
  attach_workspace:
    description: Boolean for whether or not to attach to an existing workspace. Default is true.
    type: boolean
    default: true
  workspace_root:
    description: Workspace root path that is either an absolute path or a path relative to the working directory. Defaults to '.' (the working directory).
    type: string
    default: .
  start_metro:
    description: If we should start the Metro packager in the background for this job.
    type: boolean
    default: false
  pod_install_directory:
    type: string
    default: ""
    description: The location of the "ios" directory for `pod install`. Will skip `pod install` if missing.
  pod_cache:
    description: Save and restore the CocoaPods cache? Defaults to true
    type: boolean
    default: true
  yarn_cache:
    description: Should we cache after yarn install? Defaults to true
    type: boolean
    default: true
  yarn_cache_folder:
    description: The path to the yarn cache folder
    type: string
    default: "/tmp/yarn"
  # For the iOS build command
  project_type:
    description: If the iOS app is built using a project file (*.xcodeproj) or a workspace.
    type: enum
    enum: ["project", "workspace"]
    default: "project"
  project_path:
    description: The path to the Xcode project (*.xcodeproj) or the Xcode workspace (*.xcworkspace) that you want to build, relative to the root of the repository.
    type: string
  build_configuration:
    description: The build configuration to use. This is normally either "Debug" or "Release" but you may have custom build configuration configured for your app.
    type: string
    default: "Debug"
  derived_data_path:
    description: The path to the directory to place the derived data, relative to the root of the repository.
    type: string
    default: "ios/build"
  device:
    description: The type of device you want to build for.
    type: string
    default: "iPhone 11"
  scheme:
    description: The scheme to use.
    type: string
  xcodebuild_cache:
    description: Should we cache after Xcode build? Defaults to true
    type: boolean
    default: true
  # For the Detox test command
  detox_configuration:
    description: The Detox configuration to test.
    type: string
    default: "ios.sim.release"
  detox_loglevel:
    description: The Detox logging level to use. Must be one of "fatal", "error", "warn", "info", "verbose", or "trace".
    type: enum
    enum: ["fatal", "error", "warn", "info", "verbose", "trace"]
    default: warn
  store_artifact_path:
    description: Stores detox artifacts at CircleCI
    type: string
    default: ""
  on_after_initialize:
    description: A custom command to run right after yarn install.
    type: string
    default: ""
  # For macos executor
  node_version:
    description: The version of Node to use. This can be either a major version ("8"), a major and minor ("8.4"), or a fully qualified version ("8.4.1").
    type: string
    default: "16"
  homebrew_cache:
    description: Should we cache after brew install? Defaults to true
    type: boolean
    default: true
  homebrew_update:
    description: Should we run brew update? Defaults to true
    type: boolean
    default: true
  xcode_version:
    description: The version of Xcode to use. See here for the list of supported versions https://circleci.com/docs/2.0/testing-ios/#supported-xcode-versions
    type: string
    default: "12.5.1"
  resource_class:
    description: Changes the resource class of the executor. Requires a support request to enable the resource_class parameter. See https://circleci.com/docs/2.0/configuration-reference/#resource_class
    type: string
    default: medium

executor:
  name: macos
  xcode_version: <<parameters.xcode_version>>
  resource_class: <<parameters.resource_class>>

steps:
  - when:
      condition: <<parameters.checkout>>
      steps:
        - checkout
  - when:
      condition: <<parameters.attach_workspace>>
      steps:
        - attach_workspace:
            at: <<parameters.workspace_root>>
  - setup_macos_executor:
      node_version: <<parameters.node_version>>
      homebrew_cache: <<parameters.homebrew_cache>>
      homebrew_update: <<parameters.homebrew_update>>
      android: false
  - ios_simulator_start:
      device: <<parameters.device>>
  - yarn_install:
      cache: <<parameters.yarn_cache>>
      cache_folder: <<parameters.yarn_cache_folder>>
  - when:
      condition: <<parameters.on_after_initialize>>
      steps:
        - run:
            name: "on_after_initialize"
            command: <<parameters.on_after_initialize>>
  - when:
      condition: <<parameters.start_metro>>
      steps:
        - metro_start
  - when:
      condition: <<parameters.pod_install_directory>>
      steps:
        - pod_install:
            pod_install_directory: <<parameters.pod_install_directory>>
            cache: <<parameters.pod_cache>>
  - ios_build:
      project_path: <<parameters.project_path>>
      derived_data_path: <<parameters.derived_data_path>>
      device: <<parameters.device>>
      build_configuration: <<parameters.build_configuration>>
      scheme: <<parameters.scheme>>
      project_type: <<parameters.project_type>>
      cache: <<parameters.xcodebuild_cache>>
  - detox_test:
      configuration: <<parameters.detox_configuration>>
      loglevel: <<parameters.detox_loglevel>>
  - when:
      condition: <<parameters.store_artifact_path>>
      steps:
        - store_artifacts:
            path: <<parameters.store_artifact_path>>
Download .txt
gitextract_ood6vf5p/

├── .circleci/
│   ├── config.yml
│   └── test-deploy.yml
├── .github/
│   └── ISSUE_TEMPLATE/
│       ├── bug_report.md
│       └── feature_request.md
├── .gitignore
├── .releaserc
├── .yamllint
├── CHANGELOG.md
├── LICENSE
├── README.md
├── package.json
└── src/
    ├── @orb.yml
    ├── commands/
    │   ├── android_build.yml
    │   ├── android_emulator_start.yml
    │   ├── bundle.yml
    │   ├── detox_build.yml
    │   ├── detox_test.yml
    │   ├── ios_build.yml
    │   ├── ios_simulator_start.yml
    │   ├── metro_start.yml
    │   ├── ndk_update.yml
    │   ├── pod_install.yml
    │   ├── setup_macos_executor.yml
    │   └── yarn_install.yml
    ├── examples/
    │   ├── android.yml
    │   ├── full.yml
    │   └── ios.yml
    ├── executors/
    │   ├── linux_android.yml
    │   ├── linux_js.yml
    │   └── macos.yml
    └── jobs/
        ├── android_build.yml
        ├── android_test.yml
        ├── ios_build.yml
        └── ios_build_and_test.yml
Condensed preview — 34 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (96K chars).
[
  {
    "path": ".circleci/config.yml",
    "chars": 707,
    "preview": "version: 2.1\nsetup: true\norbs:\n  orb-tools: circleci/orb-tools@12.0\n  shellcheck: circleci/shellcheck@3.1\n\nfilters: &fil"
  },
  {
    "path": ".circleci/test-deploy.yml",
    "chars": 1191,
    "preview": "version: 2.1\norbs:\n  orb-tools: circleci/orb-tools@12.0\n  node: circleci/node@5.2.0\n  # The orb definition is intentiona"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/bug_report.md",
    "chars": 579,
    "preview": "---\nname: \"Bug report\"\nabout: Create a report to help improve the project\nlabels: bug\n\n---\n\n### Orb version\n\n<!---\n  e.g"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/feature_request.md",
    "chars": 339,
    "preview": "---\nname: \"Feature request\"\nabout: Suggest an idea that will improve the project\nlabels: enhancement\n\n---\n\n## What would"
  },
  {
    "path": ".gitignore",
    "chars": 2017,
    "preview": "\n# Created by https://www.gitignore.io/api/macos,windows,linux,node\n\n### Linux ###\n*~\n\n# temporary files which can be cr"
  },
  {
    "path": ".releaserc",
    "chars": 498,
    "preview": "{\n  \"branches\": [\"main\"],\n  \"plugins\": [\n    \"@semantic-release/commit-analyzer\",\n    \"@semantic-release/release-notes-g"
  },
  {
    "path": ".yamllint",
    "chars": 110,
    "preview": "extends: relaxed\n\nrules:\n    line-length:\n        max: 200\n        allow-non-breakable-inline-mappings: true\n\n"
  },
  {
    "path": "CHANGELOG.md",
    "chars": 28495,
    "preview": "## [8.0.1](https://github.com/react-native-community/react-native-circleci-orb/compare/v8.0.0...v8.0.1) (2024-12-29)\n\n\n#"
  },
  {
    "path": "LICENSE",
    "chars": 1064,
    "preview": "MIT License\n\nCopyright (c) 2019-present\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof"
  },
  {
    "path": "README.md",
    "chars": 5217,
    "preview": "# React Native CircleCI Orb\n\n[![CircleCI Orb][orb-version-badge]][orb-page]\n\nA [CircleCI Orb](https://circleci.com/orbs/"
  },
  {
    "path": "package.json",
    "chars": 801,
    "preview": "{\n  \"name\": \"@react-native-community/circleci-orb\",\n  \"version\": \"8.0.1\",\n  \"private\": true,\n  \"description\": \"A CircleC"
  },
  {
    "path": "src/@orb.yml",
    "chars": 177,
    "preview": "version: 2.1\n\ndescription: |\n  Orb for building and testing React Native projects.\n\ndisplay:\n  source_url: \"https://gith"
  },
  {
    "path": "src/commands/android_build.yml",
    "chars": 4089,
    "preview": "description: Builds the Android app at the given path with the given build types. This should be run only after installi"
  },
  {
    "path": "src/commands/android_emulator_start.yml",
    "chars": 2853,
    "preview": "description: Installs and starts an Android emulator with the given version and name.\n\nparameters:\n  device_name:\n    de"
  },
  {
    "path": "src/commands/bundle.yml",
    "chars": 839,
    "preview": "description: Bundles all JS files.\n\nparameters:\n  platform:\n    description: The platform to build for. Usually one of \""
  },
  {
    "path": "src/commands/detox_build.yml",
    "chars": 292,
    "preview": "description: Builds the app with the given Detox configuration, as specified in package.json.\n\nparameters:\n  configurati"
  },
  {
    "path": "src/commands/detox_test.yml",
    "chars": 557,
    "preview": "description: Tests the app with the given Detox configuration, as specified in package.json.\n\nparameters:\n  configuratio"
  },
  {
    "path": "src/commands/ios_build.yml",
    "chars": 2807,
    "preview": "description: Builds the iOS app at the given path with the given build scheme and configuration. This should be run only"
  },
  {
    "path": "src/commands/ios_simulator_start.yml",
    "chars": 457,
    "preview": "description: Starts an iOS simulator with the given name.\n\nparameters:\n  device:\n    description: The type of device you"
  },
  {
    "path": "src/commands/metro_start.yml",
    "chars": 160,
    "preview": "description: Starts the Metro packager.\n\nsteps:\n  - run:\n      name: Start Metro Packager (Background)\n      background:"
  },
  {
    "path": "src/commands/ndk_update.yml",
    "chars": 202,
    "preview": "description: Update Android NDK\n\nparameters:\n  version:\n    type: string\n    default: 22.1.7171670\n\nsteps:\n  - run:\n    "
  },
  {
    "path": "src/commands/pod_install.yml",
    "chars": 1269,
    "preview": "description: install pods\n\n# note: do not use the --project-directory pod param because many example\n# projects in the r"
  },
  {
    "path": "src/commands/setup_macos_executor.yml",
    "chars": 3356,
    "preview": "description: Installs the required packages to build and test Android and iOS applications on the MacOS executor. You ne"
  },
  {
    "path": "src/commands/yarn_install.yml",
    "chars": 2160,
    "preview": "description: Install Javascript dependencies using Yarn. This command correctly configures the cache for any number of p"
  },
  {
    "path": "src/examples/android.yml",
    "chars": 2291,
    "preview": "description: 'An example of how to build, test, and release the Android app'\nusage:\n  # Orb support is from version >= 2"
  },
  {
    "path": "src/examples/full.yml",
    "chars": 3564,
    "preview": "description: 'A full setup with a Javascript test job, leading to Detox build and test jobs, and finally releasing the a"
  },
  {
    "path": "src/examples/ios.yml",
    "chars": 2527,
    "preview": "description: 'An example of how to build, test, and release the iOS app'\nusage:\n  # Orb support is from version >= 2.1\n "
  },
  {
    "path": "src/executors/linux_android.yml",
    "chars": 1005,
    "preview": "parameters:\n  gradle_options:\n    description: Gradle command options. Note that setting this will override the default "
  },
  {
    "path": "src/executors/linux_js.yml",
    "chars": 661,
    "preview": "parameters:\n  node_version:\n    description: The version of Node to use. This can be a full SemVer point release (such a"
  },
  {
    "path": "src/executors/macos.yml",
    "chars": 574,
    "preview": "parameters:\n  xcode_version:\n    description: The version of Xcode to use. See here for the list of supported versions h"
  },
  {
    "path": "src/jobs/android_build.yml",
    "chars": 3866,
    "preview": "description: Builds the Android app at the given path with the given build types.\n\nparameters:\n  # For this job\n  checko"
  },
  {
    "path": "src/jobs/android_test.yml",
    "chars": 5183,
    "preview": "description: Tests the Android app on the given device, with the given Detox configuration. You should have already buil"
  },
  {
    "path": "src/jobs/ios_build.yml",
    "chars": 5251,
    "preview": "description: Builds the iOS app at the given path with the given build scheme\n\nparameters:\n  # For this job\n  checkout:\n"
  },
  {
    "path": "src/jobs/ios_build_and_test.yml",
    "chars": 5847,
    "preview": "description: Builds the iOS app at the given path with the given build scheme and configuration and then runs the tests "
  }
]

About this extraction

This page contains the full source code of the react-native-community/react-native-circleci-orb GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 34 files (88.9 KB), approximately 23.7k tokens. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!