Commit Graph

530 Commits

Author SHA1 Message Date
Kevin Gozali fb39d45ed5 C++ - better => butter
Summary:
Renaming the `better` utilities to `butter`:
- to prevent claims that this library is superior to others - it really depends on use cases
- to indicate ease of use throughout the codebase, easily spread like butter

Changelog: [C++][Changed] Renaming C++ better util to butter, used by Fabric internals

Reviewed By: JoshuaGross

Differential Revision: D33242764

fbshipit-source-id: 26dc95d9597c61ce8e66708e44ed545e0fc5cff5
2021-12-20 22:25:14 -08:00
Charles Dudley 821382b9f7 TypeScript Module Tests
Summary:
Tests for Native Modules. Fixtures, Failures and the e2e tests were copied from the flow parser, modified for TypeScript and then the snapshots were diff'ed to ensure the parsers generated the same schema given the same (in spirit, different in syntax) input.

Changelog:
[General][Add] - Tests for TypeScript support for Native Module Codegen spec parsing

Reviewed By: RSNara

Differential Revision: D33081127

fbshipit-source-id: 3d7270dddd568090ec93d475a08a6a6011dad63c
2021-12-20 14:20:22 -08:00
Charles Dudley f9e512e8fe TypeScript Component Tests
Summary:
Tests for Native Components. Fixtures, Failures and the e2e tests were copied from the flow parser, modified for TypeScript and then the snapshots were diff'ed to ensure the parsers generated the same schema given the same (in spirit, different in syntax) input.

Changelog:
[General][Add] - Tests for TypeScript support for Native Component Codegen spec parsing

Reviewed By: RSNara

Differential Revision: D33080789

fbshipit-source-id: ae71d384f6d93da6b89eeb179c4ba7ebcd6ae03d
2021-12-20 14:20:22 -08:00
Charles Dudley f4e32ac5bf Copy Flow parser tests to prepare TypeScript Parser
Summary:
These files are directly copied from the flow parser to aid in reviewing the next two Diffs: D33080789 and D33081127.

The only things that were changed during the copy are the import/require paths to ensure this diff could ship independently. (For this diff, these tests will still test the flow parser instead of importing the typescript parser).

Changelog:
[Internal][Add] - Copy Flow parser tests to aid in Diff review

Reviewed By: RSNara

Differential Revision: D33136296

fbshipit-source-id: 007e18618c9eba13728d19e4e342fbe9642adacc
2021-12-20 14:20:22 -08:00
Charles Dudley 078f6310ba Choose parser based on file extension
Summary:
This adds the main entry point for the TypeScript parser as well as adds the logic to use the new parser if the spec file's extension is `.ts`

`js/react-native-github/packages/react-native-codegen/src/parsers/typescript/index.js` is mostly a direct copy from the flow parser.

Changelog:
[General][Add] - Choose Flow or WIP TypeScript Codegen parser based on spec's file extension

Reviewed By: RSNara

Differential Revision: D33081296

fbshipit-source-id: 267823685e6723e3c1f19752bbbe692e895c075b
2021-12-20 14:20:21 -08:00
Charles Dudley 0d3036abde TypeScript Modules
Summary:
Similar to D33080623, this is the logic for parsing Native Modules and the files were copied from the flow parser and updated for TypeScript. The logic and code path is almost identical to the flow parser.

Also, like D33080623, while there is considerable duplication to the flow parser, I decided there are enough subtle differences to warrant keeping this logic separate.

Changelog:
[General][Add] - Add WIP TypeScript support for Native Module Codegen spec parsing

Reviewed By: RSNara

Differential Revision: D33081035

fbshipit-source-id: 5a196e4693df73c0fb88abafe2b4e6be032ea7ed
2021-12-20 14:20:21 -08:00
Charles Dudley a9632c5ec5 Copy Flow parser modules logic to prepare TypeScript parser
Summary:
These files are directly copied from the flow parser to aid in reviewing the next Diff, D33081035

Changelog:
[Internal][Add] - Copy Flow parser module logic to aid in Diff review

Reviewed By: RSNara

Differential Revision: D33134982

fbshipit-source-id: 9afea2ce15404338fd2c920a8b7eafe980f18688
2021-12-20 14:20:21 -08:00
Charles Dudley 7615bde023 TypeScript Components
Summary:
This is the logic for parsing Native Components. The files were copied from the flow parser and updated for TypeScript specific types and differences in the shape of the AST. The logic and code path is almost identical to the flow parser.

While there is considerable duplication to the flow parser, I decided there are enough subtle differences to warrant keeping this logic separate.

Changelog:
[General][Add] - Add WIP TypeScript support for Native Component Codegen spec parsing

Reviewed By: RSNara

Differential Revision: D33080623

fbshipit-source-id: a68c8d4c4570e65a88a97dcea3cd18a6976c53c7
2021-12-20 14:20:21 -08:00
Charles Dudley c532fcff90 Copy Flow parser components logic to prepare TypeScript parser
Summary:
These files are directly copied from the flow parser to aid in reviewing the next Diff, D33080623

Changelog:
[Internal][Add] - Copy Flow parser component logic to aid in Diff review

Reviewed By: RSNara

Differential Revision: D33130222

fbshipit-source-id: ba7233b17d698793559da8b81bb7e1a78654e614
2021-12-20 14:20:21 -08:00
Charles Dudley 114d5a8a17 TypeScript parser foundation
Summary:
These are utility functions that the TypeScript parser uses and are copied from and follows the same logic as the flow parser with some TypeScript specific changes.  Also added dependency of `babel/parser` as the parsing engine we're using for TypeScript.

Changelog:
[General][Add] - Add foundation for WIP TypeScript parser for Codegen

Reviewed By: RSNara

Differential Revision: D33080527

fbshipit-source-id: d4bd515af549a41f07a2e3ee1a16b5ed678180b2
2021-12-20 14:20:21 -08:00
Charles Dudley 165dfbcc87 Copy Flow parser foundation for TypeScript parser
Summary:
This is a direct copy of the following files from the flow parser:

```
react-native-codegen/src/parsers/flow/errors.js
react-native-codegen/src/parsers/flow/utils.js
```

Changelog:
[Internal][Added] - Copy flow parser foundation files to aid in diff review

Reviewed By: RSNara

Differential Revision: D33137685

fbshipit-source-id: 1345c8bb0785c90b2bd64d4e6e2447f3fdb0ae6b
2021-12-20 14:20:21 -08:00
Ubax 3e6902244a fix: Removes interface only check from third party components GenerateThirdPartyFabricComponentsProvider (#32779)
Summary:
Currently the codegen does not include component with field `interfaceOnly` set to `true` in the `ThirdPartyFabricComponentsProvider`.

These components need to be added to this file, so that non-core components can be used in fabric.

## Changelog

[General [Fixed] - Fixes GenerateThirdPartyFabricComponentsProvider

Pull Request resolved: https://github.com/facebook/react-native/pull/32779

Test Plan:
Run codegen with component outside of core on iOS.

Check if components with and without `interfaceOnly` are added to `RCTThirdPartyFabricComponentsProvider`

Reviewed By: cortinico

Differential Revision: D33235363

Pulled By: ShikaSD

fbshipit-source-id: e7224d2123e4da0da912fe677dae32d3aaea2ec8
2021-12-20 11:45:44 -08:00
Charles Dudley 3a01dc41e6 Flow parser cleanup
Summary:
This diff stack enables codegen to parse TypeScript spec files and generate an identical schema to our current Flow parser.

This first diff is a small cleanup of our current flow parser.

Changelog:
[General][Fixed] - Fix typo in error string and improve consistency in Codegen's flow parser tests

Reviewed By: sota000

Differential Revision: D33080423

fbshipit-source-id: 7bf817761a7704d807a0b809c9f2270354b5c6fa
2021-12-15 15:59:38 -08:00
Alex Koller 2e3bcdfda5 Update prop generator to allow value prop name
Summary:
So I was adding a new HTTPCookie prop to our WebView native component and found that my build was [failing](https://www.internalfb.com/diff/D32602297?dst_version_fbid=338931330931416) due to "redefinition of `value`". Looks like we use the name of the prop as a variable name during codegen, and this can conflict with some other hardcoded variable names. Rather than try and come up with a better prop name, I figured we can just append some string to our codegen name to reduce the chance for conflicts.

Changelog:
[Internal][Changed] - Change codegen variable naming to prevent conflicts to prop names

Reviewed By: JoshuaGross

Differential Revision: D32967807

fbshipit-source-id: 1b3631ec783b229eddfd3c801ffbb397910fc882
2021-12-09 12:02:29 -08:00
Sota Ogo 74f3913128 Version bump
Summary:
I added some functionalities to react-native-codegen to support the new architecture. Publishing the new version so that those are available to use.

Changelog: [internal] Updated react-native-codegen version

Reviewed By: cortinico

Differential Revision: D32941951

fbshipit-source-id: f1ab3d72c76ac153939c634655a4725b4f49d48d
2021-12-08 20:56:35 -08:00
Nicola Corti 28aeb7b865 Do not .lowerCase the library name when codegenerating TurboModule Specs
Summary:
The Codegen is generating a broken output if using the default library name: `Packages<GradleModuleName>Spec`.
This diff is fixing the codegenerator to don't call the `.lowerCase` on the library name when generating the Makefile.

Changelog:
[Android] [Fixed] - Do not .lowerCase the library name when codegenerating TurboModule Specs

Reviewed By: ShikaSD

Differential Revision: D32597578

fbshipit-source-id: dee729a44134d7b3878074507191bb2a1c200608
2021-11-24 11:57:52 -08:00
Ramanpreet Nara 6b1ccef71f Update FabricComponentsProvider to use template functions
Summary:
## Rationale
- Consistency with our other generators.
- Past effort, with rationale: D32021441 (https://github.com/facebook/react-native/commit/3848f48943d0530c3712394b9e405ebddf21cf3b)

Changelog: [Internal]

Reviewed By: sota000

Differential Revision: D32546918

fbshipit-source-id: 5167ca5d7154c0e2fa0867521feaf6a6a382900e
2021-11-18 18:15:34 -08:00
Nicola Corti aa4da248c1 Do not opt-out fbsource/xplat/js/react-native-github/packages from CLANGFORMAT
Summary:
As we're working on C++ code for RNTester to integrate Fabric, we should enable CLANGFORMAT for the files over there.

Changelog:
[Internal] [Changed] - Enable CLANGFORMAT on fbsource/xplat/js/react-native-github/packages

Reviewed By: ShikaSD

Differential Revision: D32493605

fbshipit-source-id: 7b5d63f6d2fae1a1aa1e782738953c8cd2cdbe4b
2021-11-18 04:44:46 -08:00
Evan Yeung 037e346197 Add LTI annotations to xplat/js
Summary:
This diff runs the codemod to add type annotations to function parameters in preparation for Flow's local type inference (LTI) project. I ran the codemod over xplat/js and reverted any files that had flow errors in them. See the list of commands run to see the regeneration of various files.

Changelog:
[Internal][Changed] - Added type annotations

Reviewed By: yungsters

Differential Revision: D32075270

fbshipit-source-id: 6a9cd85aab120b4d9e690bac142a415525dbf298
2021-11-10 15:40:15 -08:00
Sota Ogo d065b06da1 Generate ThirdpartyFabricComponentsProvider to extend RCTFabricComponentsPlugins
Summary:
Currently, we don't have a way to extend RCTFabricComponentsPlugins in OSS. This diff  adds a codegen to generate ThirdpartyFabricComponentsProviderwhich will be used to extend RCTFabricComponentsPlugins.

It works almost exactly the same as RCTFabricComponentsPlugins, and in the future we might want to consider merging them together.

Changelog: [internal]

Reviewed By: hramos

Differential Revision: D32128760

fbshipit-source-id: b4f3a082f94c3053251cc6a0323c488f649deaa9
2021-11-10 10:09:59 -08:00
Tim Yung 148c98ec80 RN: Resolve Outstanding ESLint Warnings
Summary:
Resolves outstanding ESLint warnings in React Native.

Changelog:
[Internal]

Reviewed By: lunaleaps

Differential Revision: D32291912

fbshipit-source-id: 61337d5a5a0e6ed55f732675e029f4b76d850af9
2021-11-09 21:46:21 -08:00
Tim Yung 10f9ab4d69 RN: Follow-up Format w/ Prettier v2.x
Summary:
When I upgraded React Native to Prettier v2.x, I removed `format` from a few files to reduce the number of changes.

This is a follow-up to bring back `format` and fix any remaining issues.

Changelog:
[Internal]

Reviewed By: zertosh

Differential Revision: D32287259

fbshipit-source-id: 37ea6d2c973b1db5d37c46d73675bdf436fb9a9d
2021-11-09 13:16:43 -08:00
Nicola Corti 3b7044dd07 Bump codegen to 0.0.11 (#32534)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/32534

Bumping react-native-codegen to 0.0.11 as 0.0.10 was broken (published empty).

Fixes #32533

Changelog:
[Internal] [Changed] - Bump codegen to 0.0.10

Reviewed By: lunaleaps

Differential Revision: D32156067

fbshipit-source-id: 61025b1159d1430728313bd1afcd96f83ee85ff5
2021-11-04 10:33:39 -07:00
Tim Yung fba1ae1643 RN: Temporarily Disable Prettier for Some Files
Summary:
We are in the middle of a Prettier upgrade and some of the files which disagree between Prettier v1.x and v2.x are now being flagged by `eslint-plugin-prettier` as lint errors.

The correct fix here is probably to update `eslint-config-prettier` and `eslint-plugin-prettier`, but I am landing this first to unbreak CI.

Reviewed By: mendoncakeegan

Differential Revision: D32129458

fbshipit-source-id: a5206a5ef58f1d7614f9459c99b9e39109be6de9
2021-11-02 23:09:38 -07:00
Tim Yung 77ecc7ede1 JS: Format with Prettier v2.4.1 [3/n]
Summary:
Changelog:
[General][Internal]

Reviewed By: zertosh

Differential Revision: D31883447

fbshipit-source-id: cbbf85e4bf935096d242336f41bf0cc5d6f92359
2021-11-02 22:14:16 -07:00
Tim Yung 4e587a1b7d JS: Upgrade to Prettier v2.4.1 [1/n]
Summary:
Changelog:
[General][Changed] - Upgraded to `prettier@^2.4.1`.

Reviewed By: zertosh

Differential Revision: D31854010

fbshipit-source-id: 6d7a2e758a3ddf7c758ceffb14d98eb93b0ce4b0
2021-11-02 22:14:16 -07:00
Ramanpreet Nara 27ddbd8137 Refactor: Simplify deprecated component code-gen logic in View Config generator
Summary:
**Motivation:** Readability. It was hard to tell how componentName, paperComponentName, and paperComponentNameDepreacted produced the NativeComponentRegistry.get call.

Changelog: [Internal]

Reviewed By: philIip

Differential Revision: D32108276

fbshipit-source-id: ea7c9fe4dc50cdd6fec94b5cd25f7bbcfb451ef6
2021-11-02 21:27:36 -07:00
Nicola Corti 8fef52035b Bump codegen to 0.0.10
Summary:
For the sake of the playbook, I'm bumping the codegen to the latest stable.
This is needed as there was a change in the Android NDK Makefile that wasn't shipped yet.

Changelog:
[Internal] [Changed] - Bump codegen to 0.0.10

Reviewed By: hramos

Differential Revision: D32101355

fbshipit-source-id: c20268f1ea93ebad8f92f760874a43c8ceeaf9f9
2021-11-02 12:22:17 -07:00
Ramanpreet Nara 857137dc21 Create E2E tests for Component Generators
Summary:
## Rationale
- We actually don't have E2E tests that test the parser + generator together, until now.
- **Documentation Value:** These tests show how the Component Spec files in [react-native-codegen/e2e/__test_fixtures__/](https://www.internalfb.com/code/fbsource/[e32a790dfa05]/xplat/js/react-native-github/packages/react-native-codegen/e2e/__test_fixtures__/components/) map to all the different types of codegen output.

Changelog: [Internal]

Reviewed By: sshic

Differential Revision: D32081445

fbshipit-source-id: 02cd17945ef63a42381d6d4adbd0a9b0eaa2a1ef
2021-11-02 10:54:11 -07:00
Ramanpreet Nara 3848f48943 Use JavaScript functions for Component templates
Summary:
## Rationale
**Disclaimer**: This is an incremental step towards more maintainable/readable react-native-codegen generators. In the future, we may want to replace these templates/string concat logic with *something better*. But until we decide what that *something better* is, let's at least get rid of all this gross string find/replace.

Benefits of using Function templates over String.prototype.replace.
- **Self-documenting**: Template Functions enumerate/describe their exact data dependencies in their signature. You no longer have to read the template implementation to see what data you need to pass into the template.
- **Improved Readability**: JavaScript syntax highlighting makes it really easy to see where/how the data is inserted into the templates. Also template variables used be prefixed/suffixed with ::, which made things really confusing in C++ code (e.g: wtf is `::_CLASSNAME_::EventEmitter::::_EVENT_NAME_::`?).
- **Simpler Interpolation**: Don't have to worry about .replaceAll vs .replace, or calling these replace functions with regexes or strings.
- **Template Type-safety**: Ensure that the correct data types are passed to the component templates (e.g: flow will complain if you accidentally pass null/undefined when a template expects a string).
- **Template Type-safety**: Ensure that we don't pass in extra data to templates (this diff catches/fixes instances of this error). Ensure that we don't forget to pass in data to the template.
- etc.

After this diff, both our Component and NativeModule generators will be using template functions. This string find/replace exists no more in react-native-codegen.

This is also a very surface-level change. I made no efforts to simplify these templates. Let's take a look at that later, as necessary.

Changelog: [Internal]

Reviewed By: yungsters

Differential Revision: D32021441

fbshipit-source-id: f8f27069bcbf9d66dcafb7d1411da1f938eb6dcd
2021-11-01 09:00:24 -07:00
Ramanpreet Nara 58c9d8eda7 Fix "Duplicate license header lint error" in Component generators
Summary:
See title.

Changelog: [Internal]

Reviewed By: yungsters

Differential Revision: D32019151

fbshipit-source-id: aea69a6c032cef1c99cd7641bdc10e730076e781
2021-10-29 10:43:39 -07:00
Nicola Corti a9fc0c5a9c Re-add libreact_debug to codegen makefile and add prebuilts for them
Summary:
While working updating the codeden Makefile template for Android, I've removed
the `libreact_debug` and `libreact_render_debug` dependencies as they were unused in a
simple turbomodule. Turns out that `:ReactAndroid` is depending on having those dependencies.

Moving the build file to use AGP APIs, triggers this scenario and is making `ReactAndroid`
failing to build (see the build status for https://github.com/facebook/react-native/pull/32443).

I'm updating the codegen Makefile template to reintrodce the two libraries + I've update the prebuilt
makefile (used in the playbook) to include `react_debug` prebuilts as they were missing.

Changelog:
[Internal] [Changed] - Re-add libreact_debug to codegen makefile and add prebuilts for them

Reviewed By: ShikaSD

Differential Revision: D31900675

fbshipit-source-id: ff188c0498a0dca4a951a548a580ca8dd0674782
2021-10-27 09:20:35 -07:00
Nicola Corti e3a71b019f Bump react-native-codegen to 0.0.9
Summary:
Bumping the codegen to a new version to ship a change to the Android template.

Changelog:
[General] [Changed] - Bump react-native-codegen to 0.0.9

Reviewed By: hramos, mdvacca

Differential Revision: D31762139

fbshipit-source-id: 71a96210a3577c12ff3c9f9013c6e72adf4a0ecb
2021-10-22 03:09:24 -07:00
Tim Yung 9ac03361e6 RN: Add glob Flow Definition
Summary:
Adds the `glob` type definition via `flow-typed` so that the `combine-js-to-schema-cli.js` script does not need a Flow suppression.

Changelog:
[Internal]

Reviewed By: kacieb

Differential Revision: D31800809

fbshipit-source-id: 3e01a096d2153639a619a7152bd06332df57f06b
2021-10-20 19:25:45 -07:00
Nicola Corti c7d0c94bf9 Update codegen template to include correct native modules and C++17
Summary:
This diff updates the Makefile generated by `react-native-codegen`
to include the correct list of modules. Specifically I've removed some modules that are unused
like `libreact_debug` and added others that are necessary for the build to compile correctly
such as `libfbjni`.

Plus I've bumped the C++ version to 17 as we had a mixture of 14 and 17 across the codebase.

Changelog:
[Internal] [Changed] - Update codegen template to include correct native modules and C++17

Reviewed By: mdvacca

Differential Revision: D31754427

fbshipit-source-id: 8490fa5c5ad298689b564f760c3fc65550c94547
2021-10-20 10:19:10 -07:00
Sota Ogo 8fcc2fa31a Update the path to use the full path so that they can be found in the OSS environment.
Summary:
I had to make this change when enabling Fabric in OSS. Without the full path, it can't find the modules like processColor within node_modules.

Changelog: Internal

Reviewed By: motiz88

Differential Revision: D31300424

fbshipit-source-id: 59b82470ec1ce63b63704931786e22b98f4bf046
2021-10-19 18:35:13 -07:00
Tim Yung ba7424d4d2 RN: Normalize Prettier Configuration
Summary:
Changelog:
[Internal]

Reviewed By: zertosh

Differential Revision: D31745469

fbshipit-source-id: b930e4aefd8d21021b7c43a48ee84d0546fb56eb
2021-10-19 01:51:36 -07:00
Joshua Gross b60e229d7f Remove compiler_flags from BUCK modules
Summary:
Nearly all of these are identical and these compiler_flags are now centralized in rn_defs.bzl. This should have NO CHANGE on build configuration, the flags have just moved for now.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D31631766

fbshipit-source-id: be40ebeb70ae52b7ded07ca08c4a29f10a0ed925
2021-10-14 15:34:29 -07:00
Moti Zilberman 268efb1022 Use deep require instead of Haste for NativeComponentRegistry
Summary:
Changelog: [Internal]

Some environments that use codegen don't have Haste enabled, breaking the `require('NativeComponentRegistry')` call in generated view configs. Here we change it to reference an explicit path relative to `react-native`.

Reviewed By: JoshuaGross

Differential Revision: D31166063

fbshipit-source-id: cebc23d0d95b5cde76d0f8473eabc03ca82a862e
2021-09-27 13:47:28 -07:00
Héctor Ramos b494ae0703 Move react-native-codegen dependency to react-native root package.json
Summary:
The `react-native-codegen` package handles the generation of native code artifacts for modules and components in the new React Native architecture.

This change moves the dependency from being an application-level dependency to being a direct dependency of the `react-native` package.

Changelog:
[General] Move react-native-codegen dependency to react-native root package.json

Reviewed By: yungsters

Differential Revision: D31129619

fbshipit-source-id: dfa0df589c4dbca70dde6db0208485431e304809
2021-09-23 21:40:22 -07:00
Andrei Shikov e6fcbc5076 Only glob src folder of codegen for buck compilation
Summary:
RN codegen generates `lib/` folder in OSS which invalidates caches for macOS build. By only globbing `src/` folder we can avoid these issues.

Changelog:
[Internal] Exclude codegen files built in OSS to fix internal build.

Reviewed By: cortinico, motiz88

Differential Revision: D30959522

fbshipit-source-id: 6371beb3997bc15ed155a7f7871fb80c199367a3
2021-09-15 18:31:37 -07:00
Nicola Corti c3ff336326 Merge the two Gradle Plugins (#32177)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/32177

This diff merges the `react-native-gradle-plugin` and the `react-codegen/android` into a single plugin.
This will allow us to iterate faster on a single plugin, will create less confusion for our users (`react` vs `reactApp`)
and will help us avoid race conditions when the two plugins are applied together (as we will control the whole lifecycle of it).

Changelog:
[Internal] [Changed] - Merged the two Gradle Plugins

allow-large-files

Reviewed By: ShikaSD

Differential Revision: D30765147

fbshipit-source-id: fcb02a181c7d900daa514107c637d0ee0225976c
2021-09-15 03:21:23 -07:00
Facebook Community Bot 671068f28d Re-sync with internal repository (#32212)
Co-authored-by: Facebook Community Bot <6422482+facebook-github-bot@users.noreply.github.com>
2021-09-15 10:45:06 +01:00
Sota Ogo 286df9000e Throw when extendsProps is empty
Summary:
If I understand the code correctly, component.extendsProps is expected to have more than 1 entry. I encounter a bug where it was an empty and produced an broken Props.h file while testing out in OSS.

```
// Example of the broken file.
class RNTMyNativeViewProps final :  {
 public:
```
In this diff, it makes it clear that the function has failed so that the codegen fails when the input is wrong.

There is probably an upstream problem that we should warn about, but this diff is just to make sure this method fails loudly.

Changelog: [Internal]

Reviewed By: hramos

Differential Revision: D30847173

fbshipit-source-id: 34c894f0a7bb81e132b6ed44f51d0f92ed9a5a20
2021-09-14 11:47:38 -07:00
Sota Ogo 2a0293906f Add an error message when there is no modules to process in codegen
Summary:
Adding an error message when codegen doesn't recognize any modules to help users understand what's going on.

Changelog: [Internal]

Reviewed By: RSNara

Differential Revision: D30624535

fbshipit-source-id: 781f1f874a5b0c16a05191186b81c2d3892da95b
2021-09-09 17:26:19 -07:00
Timothy Yung ab2bdee735 Fix encoding for gradlew.bat files (#32178) 2021-09-09 14:33:50 -07:00
Nicola Corti b1120c6a65 Bump Gradle to 7.1.1 (#32138)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/32138

This is a follow up to the Gradle bump: D30486612 (https://github.com/facebook/react-native/commit/85249cafe8870ab8f47c38569b106555ce2f8527)

Changelog:
[Android] [Changed] - Bumped Gradle to 7.1.1

Reviewed By: ShikaSD

Differential Revision: D30698411

fbshipit-source-id: ae51499c36380dca6763abeaf04ab3d6ca37456d
2021-09-02 04:31:42 -07:00
Nicola Corti 85249cafe8 Update project to build on Gradle 7.0.2 (#32073)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/32073

This Diff bumps the version of Gradle used to build the project to
7.0.2. Ideally we could bump to 7.2.x directly, but I'll do one minor version
at a time to exclude potential build problems.

This diff is addressing all the extra build warnings that got raised by the new version.

Changelog:
[Android][Changed] - Bumped Gradle project version to 7.0.2

Reviewed By: ShikaSD

Differential Revision: D30486612

fbshipit-source-id: 70e0f7d18e547013ca7b1d12f8dd64a633df5870
2021-08-31 13:27:27 -07:00
Neil Dhar 1bc885b8b8 Make JSI a dynamic library
Summary:
Ship libjsi as a standalone dynamic library. This prevents problems
with exception handling caused by duplicate typeinfo across multiple
shared libs, and reduces bundle size by removing duplicate copies of
JSI.

Changelog: [Internal]

Reviewed By: fkgozali

Differential Revision: D30599215

fbshipit-source-id: abad1398342a5328daa825f3f684e0067cad7a96
2021-08-27 17:16:49 -07:00
Chatura Atapattu 2c2b831716 Apply new buildifier fixes
Summary: Changelog: [Internal]

Reviewed By: zertosh

Differential Revision: D30407205

fbshipit-source-id: 022a02829d59a900764b228afb9856ed1ba2cf8c
2021-08-19 20:01:02 -07:00