Files
react-native/packages/react-native-codegen
Ramanpreet Nara dc0b917fb5 Preserve directory structure in android zip
Summary:
The Codegen runs on all JavaScript specs, generating C++/Java/Jni, etc. Then, we copy only the Java files into a directory:

https://www.internalfb.com/intern/diffusion/FBS/browsefile/master/xplat/js/react-native-github/packages/react-native-codegen/DEFS.bzl?commit=3945e905d6636c005af77d29b7f45ef7b1efe00e&lines=340-347

And zip that directory up, before [creating an android_library with that zip](https://www.internalfb.com/intern/diffusion/FBS/browsefile/master/xplat/js/react-native-github/packages/react-native-codegen/DEFS.bzl?commit=3945e905d6636c005af77d29b7f45ef7b1efe00e&lines=395-414%2C442-452%2C415-442):

https://www.internalfb.com/intern/diffusion/FBS/browsefile/master/xplat/js/react-native-github/packages/react-native-codegen/DEFS.bzl?commit=3945e905d6636c005af77d29b7f45ef7b1efe00e&lines=365-371

**Problem:** We unnecessarily flatten the directory structure of all our Java files.

This diff moves all the files under the java/ folder of the Codegen output into the zip that is used to create the android_library. This way, we avoid filename collisions between two Pojos belonging to two different components (with different packages), but that have the same name.

Changelog: [Internal]

Differential Revision: D26050260

fbshipit-source-id: f92e916cd640a688997dd75c2707d77cb15de083
2021-01-26 17:07:00 -08:00
..
2021-01-13 19:19:30 -08:00
2021-01-26 16:50:39 -08:00
2020-09-29 14:39:40 -07:00

react-native-codegen

Version

Installation

yarn add --dev react-native-codegen

Note: We're using yarn to install deps. Feel free to change commands to use npm 3+ and npx if you like