react-native/.gitignore

139 lines
2.6 KiB
Plaintext
Raw Normal View History

2015-01-30 01:10:49 +00:00
# Xcode
2015-02-25 17:54:45 +00:00
!**/*.xcodeproj
!**/*.pbxproj
!**/*.xcworkspacedata
!**/*.xcsettings
!**/*.xcscheme
2015-01-30 01:10:49 +00:00
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata
*.xccheckout
*.moved-aside
DerivedData
*.hmap
*.ipa
*.xcuserstate
2015-04-14 18:36:13 +00:00
project.xcworkspace
**/.xcode.env.local
2015-01-30 01:10:49 +00:00
# Gradle
/build/
/packages/react-native-gradle-plugin/build/
/packages/rn-tester/build
/packages/rn-tester/android/app/.cxx/
/packages/rn-tester/android/app/build/
/packages/rn-tester/android/app/gradle/
/packages/rn-tester/android/app/gradlew
/packages/rn-tester/android/app/gradlew.bat
2015-12-18 11:37:46 +00:00
/ReactAndroid/build/
Update ReactAndroid to use the AGP NDK Apis (#32443) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/32443 This diff removes all the custom Gradle machinery to build the native code and delegates to AGP the triggering of the `ndk-build` command. This means that the native build will be now invoked with the `:ReactAndroid:externalNativeBuild<Variant>` task. An important thing to notice is that that task will always run, and will delegate to Make the compilation avoidance. If you invoke the task twice, the second time it will be significantly faster. On my machine this takes ~6/7 mins the first time, and 30 seconds the second time. There are some gotchas that are worth noting: * The native build will run on every build now. Given the complexity of our native build graph, even with an up-to-date build, Make will still take ~30 seconds on my machine to analyse all the targets and mention that there is no work to be done. I believe this could be impactful for local development experience. The mitigation I found was to apply an `abiFilter` to build only the ABI of the target device (e.g. arm64 for a real device and so on). This reduces the native build to ~10 seconds. * All the change to the `react-native-gradle-plugin` source will cause the Gradle tasks to be considered invalid. Therefore they will re-extract the header files inside the folders that are used by Make to compile, triggering a near-full rebuild. This can be a bit painful when building locally, if you plan to edit react-native-gradle-plugin and relaunch rn-tester (seems to be like an edge case scenario but worth pointing out). The mitigation here would be to invoke the tasks like ``` gw :packages:rn-tester:android:app:installHermesDebug -x prepareBoost -x prepareLibevent -x prepareGlog \ -x prepareJSC -x extractNativeDependencies -x generateCodegenArtifactsFromSchema \ -x generateCodegenSchemaFromJavaScript ``` Changelog: [Internal] [Changed] - Refactor Extract Headers and JNI from AARs to an internal task Reviewed By: ShikaSD Differential Revision: D31683721 fbshipit-source-id: fa85793c567796f4e04751e10503717a88cb0620
2021-11-01 12:56:47 +00:00
/ReactAndroid/.cxx/
/ReactAndroid/gradle/
/ReactAndroid/gradlew
/ReactAndroid/gradlew.bat
/ReactAndroid/external-artifacts/build/
/ReactAndroid/external-artifacts/artifacts/
/ReactAndroid/hermes-engine/build/
/ReactAndroid/hermes-engine/.cxx/
/template/android/app/build/
/template/android/build/
2016-01-30 21:02:32 +00:00
# Buck
.buckd
buck-out
/.lsp.buckd
/.lsp-buck-out
/ReactAndroid/src/main/jni/prebuilt/lib/
/ReactAndroid/src/main/gen
2016-01-30 21:02:32 +00:00
# Android Studio
.project
.settings
.classpath
# Watchman
.watchmanconfig
# Android
.idea
.gradle
local.properties
*.iml
/android/*
!/android/README.md
# Node
2015-01-30 01:10:49 +00:00
node_modules
*.log
.nvm
package-lock.json
# OS X
.DS_Store
# Test generated files
/ReactAndroid/src/androidTest/assets/AndroidTestBundle.js
*.js.meta
/coverage
/third-party
# Test Reports
/reports
# Root dir shouldn't have Xcode project
/*.xcodeproj
# ReactCommon subdir shouldn't have Xcode project
/ReactCommon/**/*.xcodeproj
# Libs that shouldn't have Xcode project
/Libraries/FBLazyVector/**/*.xcodeproj
/Libraries/RCTRequired/**/*.xcodeproj
/React/CoreModules/**/*.xcodeproj
Make codegen more reliable on iOS (#30792) Summary: This addesses a few issues I noticed while migrating my app to the new build-time codegen on iOS. 1. I noticed random failures because of codegen on iOS. This is mostly due to the fact the codegen output files are not specified in the xcode script. The only reason it works relatively fine currently is because the codegen output is inside the input files directory. This has the side effect of causing files to be regenerated every build, then causes all core modules to be recompiled which adds up a significant amount of time to rebuilds. To fix this I added the generated files to the script phase output and moved the FBReactNativeSpec dir outside of the codegen source (Libraries). I moved it to the React directory as this seemed to make sense and is where a lot of iOS files are as well as the core modules. Note this might require internal changes. This removes the circular dependency between our build phase input and output so consecutive builds can be cached properly. 2. Add `set -o pipefail` to the xcode script, this helped propagate errors properly to xcode because of the `| tee` pipe so it fails at the script phase and not later with a header not found error. Also add `2>&1` to pipe stderr to stdout so errors are also captured in the log file. 3. Add the `-l` flag to the bash invocation to help finding the yarn binary. With my setup yarn is added to the system PATH in my user .profile. Adding this file will cause bash to source the user environment which xcode scripts does not by default. I think this will help with most setups. 4. If yarn is not found the `command -v yarn` would make the script exit without any output because of the -e flag. I made a change to ignore the return code and check later if YARN_BINARY is set and have an explicit error message if not. ## Changelog [iOS] [Fixed] - Make codegen more reliable on iOS Pull Request resolved: https://github.com/facebook/react-native/pull/30792 Test Plan: Tested various project states to make sure the build always succeeds in RN tester: - Simulate fresh clone, remove all ignored files, install pods, build - Build, delete FBReactNativeSpec generated files, build again - Build, build again, make sure FBReactNativeSpec is cached and not rebuilt - Make the script fail and check that xcode shows the script error logs properly ![image](https://user-images.githubusercontent.com/2677334/105891571-c8badd00-5fde-11eb-839c-259d8e448523.png) Note: Did not test fabric Reviewed By: fkgozali Differential Revision: D26104213 Pulled By: hramos fbshipit-source-id: e18d9a0b9ada7c0c2e608d29ffe88087f04605b4
2021-02-01 22:36:52 +00:00
/React/FBReactNativeSpec/**/*.xcodeproj
/packages/react-native-codegen/**/*.xcodeproj
# Ruby Gems (Bundler)
/vendor
/template/vendor
# iOS / CocoaPods
/template/ios/build/
/template/ios/Pods/
/template/ios/Podfile.lock
/packages/rn-tester/Gemfile.lock
# Ignore RNTester specific Pods, but keep the __offline_mirrors__ here.
/packages/rn-tester/Pods/*
!/packages/rn-tester/Pods/__offline_mirrors_hermes__
!/packages/rn-tester/Pods/__offline_mirrors_jsc__
# @react-native/codegen
Make codegen more reliable on iOS (#30792) Summary: This addesses a few issues I noticed while migrating my app to the new build-time codegen on iOS. 1. I noticed random failures because of codegen on iOS. This is mostly due to the fact the codegen output files are not specified in the xcode script. The only reason it works relatively fine currently is because the codegen output is inside the input files directory. This has the side effect of causing files to be regenerated every build, then causes all core modules to be recompiled which adds up a significant amount of time to rebuilds. To fix this I added the generated files to the script phase output and moved the FBReactNativeSpec dir outside of the codegen source (Libraries). I moved it to the React directory as this seemed to make sense and is where a lot of iOS files are as well as the core modules. Note this might require internal changes. This removes the circular dependency between our build phase input and output so consecutive builds can be cached properly. 2. Add `set -o pipefail` to the xcode script, this helped propagate errors properly to xcode because of the `| tee` pipe so it fails at the script phase and not later with a header not found error. Also add `2>&1` to pipe stderr to stdout so errors are also captured in the log file. 3. Add the `-l` flag to the bash invocation to help finding the yarn binary. With my setup yarn is added to the system PATH in my user .profile. Adding this file will cause bash to source the user environment which xcode scripts does not by default. I think this will help with most setups. 4. If yarn is not found the `command -v yarn` would make the script exit without any output because of the -e flag. I made a change to ignore the return code and check later if YARN_BINARY is set and have an explicit error message if not. ## Changelog [iOS] [Fixed] - Make codegen more reliable on iOS Pull Request resolved: https://github.com/facebook/react-native/pull/30792 Test Plan: Tested various project states to make sure the build always succeeds in RN tester: - Simulate fresh clone, remove all ignored files, install pods, build - Build, delete FBReactNativeSpec generated files, build again - Build, build again, make sure FBReactNativeSpec is cached and not rebuilt - Make the script fail and check that xcode shows the script error logs properly ![image](https://user-images.githubusercontent.com/2677334/105891571-c8badd00-5fde-11eb-839c-259d8e448523.png) Note: Did not test fabric Reviewed By: fkgozali Differential Revision: D26104213 Pulled By: hramos fbshipit-source-id: e18d9a0b9ada7c0c2e608d29ffe88087f04605b4
2021-02-01 22:36:52 +00:00
/React/FBReactNativeSpec/FBReactNativeSpec
/packages/react-native-codegen/lib
/packages/react-native-codegen/tmp/
Update iOS Fabric-related files to compile on OSS (#29810) Summary: Original PR contents: This pull request updates the Podspecs and associated build scripts, and some source files so they build on OSS. RNTester now compiles with `fabric_enabled` again. The following changes have been made: * Various spots that were pointing to the old `ReactCommon/fabric` location have now been updated to `ReactCommon/react/renderer` * Files that were attempting to use internal FB header `FBRCTFabricComponentsPlugins.h` were changed to use `RCTFabricComponentsPlugins.h` * `RCTFabricComponentsPlugins` in OSS was updated to include the `Image` fabric component (thanks tsapeta) * Replaced old `generate-rncore.sh` build script with new `generate-rncore.js` script which does not require `flow-node` and uses the `react-native-codegen` API directly, so there is no longer any need for an interim `schema-rncore.json` file. * Updated Yoga podspec which wasn't fully synced with changes from the main Yoga repo * Updated Fabric podspec with additional needed subspecs Additions to PR by hramos: * Replaced use of generate-rncore scripts with the original generate-native-modules-specs.sh script, which is now generate-specs.sh and supports both codegen for Native Modules and Components now (TurboModules/Fabric). * Codegen now runs at build time as part of the Xcode build pipeline instead of as part of `pod install`. The build script is injected by the FBReactNativeSpec pod, as the pod is part of both Fabric and non-Fabric builds. ## Changelog [General] [Fixed] - RNTester compiles with `fabric_enabled` again Pull Request resolved: https://github.com/facebook/react-native/pull/29810 Test Plan: RNTester now compiles and runs in the simulator again when `fabric_enabled` is set to `true`. ``` cd xplat/js/react-native-github/packages/rn-tester USE_FABRIC=1 pod install open RNTesterPods.xcworkspace # Build and run ``` Reviewed By: fkgozali Differential Revision: D24058507 Pulled By: hramos fbshipit-source-id: 8b2ea3694e6cb9aa23f83f087e2995fd4320e2bb
2020-12-22 16:33:56 +00:00
/ReactCommon/react/renderer/components/rncore/
/packages/rn-tester/NativeModuleExample/ScreenshotManagerSpec*
# Additional SDKs
/sdks/download
/sdks/hermes
/sdks/hermesc
# Visual studio
.vscode
.vs
# Android memory profiler files
*.hprof
# Temporary files created by Metro to check the health of the file watcher
.metro-health-check*