Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/43091
Fix typo in unit test
Changelog:
[Internal] [Changed] - Fix typo in unit test
Reviewed By: mdvacca
Differential Revision: D53918471
fbshipit-source-id: 0453c01fab1dc04397058577ea61b50994124cf0
Summary:
RNGP now supports parsing the cxxModule field in codegenConfig and passes it over to codegen.
Changelog:
[Internal] [Changed] - Update RNGP to handle cxxModule in codegenConfig
Reviewed By: cipolleschi
Differential Revision: D53669912
fbshipit-source-id: 702f09ccf793f9205f0c8b54346c5d809695c35d
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/42675
`ANDROIDLINT` config now has a base setup for RN. This enables it in arc linter, and fixes automatically fixable issues.
Changelog: [Internal]
Reviewed By: joevilches
Differential Revision: D53115471
fbshipit-source-id: 2556c21770f7c7ca54d1bccfff527d39df20101e
Summary:
With the current ways metro location is determined, when we want to use a different metro port this requires app to be rebuild as the port and location are stored in resource file that gets compiled to R.class. The only way to avoid app rebuild due to a port change is to use shared preferences that can be accessed from dev menu, where metro URL can be specified. However, due to a separate code-paths for retrieving bundle location and for `/inspector/device` calls, the setting only applies to the former. As a consequence, you can change metro URL in the shared preferences, but debugging would only work if you use the default port or you rebuild the app with the correct port number.
This PR removes the separate code-path for retrieving inspector URL including all the dependencies scattered across different files including the gradle plugin. We then replace calls to `PackagerConnectionSettings.getInspectorServerHost` with `PackagerConnectionSettings.getDebugServerHost` which respects the shared preferences and other possible ways of configuring the port.
I decided to remove the separate inspector URL code path, as the resource value for inspector port added in https://github.com/facebook/react-native/issues/23616 was never functioning properly due to a bug. In the said PR introduced a bug in [AndroidInfoHelpers.java](https://github.com/facebook/react-native/blob/a13d51ff1c38ea85e59f4215563c0dd05452f670/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/AndroidInfoHelpers.java#L77) where `react_native_dev_server_port` was used instead `react_native_inspector_proxy_port`. As a result the added resource value was never read.
This can be potentially a breaking change as I'm removing some public methods. However I think it is unlikely anyone relied on said methods. As a part of this PR I'm also changing occurences of removed methods from ReactAndroid.api – I don't know how to test those changes since I don't understand how this file is used as it doesn't have any references in public code.
## Changelog:
[ANDROID] [FIXED] - Make Android respect metro location from shared preferences for the debugger workflow
Pull Request resolved: https://github.com/facebook/react-native/pull/42617
Test Plan:
1. Run android app on emulator using default port
2. Check the debugger works when using "Open Debugger" option from dev menu
3. Restart metro with custom port (`--port 9090`) while keeping the app running
4. Open dev menu, click "Settings" then "Debug server host & port", put "10.0.2.2:9090" there
5. Reload the app
6. Before this change things like hot reload would continue to work while "Open Debugger" option would do nothing
7. After this change both reloading and debugging will work
Important: I haven't tested changes made to ReactAndroid.api as I don't know what this files is used for with no references in the codebase.
Reviewed By: cortinico
Differential Revision: D53010023
Pulled By: huntie
fbshipit-source-id: cc8b9c5c7e834ec9ea02b1ed5acf94f04f7b7116
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41956
By default, generated Cxx sources for components all end up in same directory. However the include declarations in them look like this:
```
#include <react/renderer/components/${libraryName}/ShadowNodes.h>
```
And not like this:
```
#include "ShadowNodes.h"
```
This works fine with Buck because it supports header prefixes.
To get this working with CocoaPods we define additional `HEADER_SEARCH_PATHS` for our `React-Codegen` pod.
This approach will not work if we want to generate code at the library level and check in the artifacts. That's because we don't have control over the Podspec there, and can't inject those additional `HEADER_SEARCH_PATHS`.
This diff adds the `headerPrefix` argument to the codegen entry point. It is `react/renderer/components/${libraryName}` by default, but can become empty if we want to generate code at the library level, and don't want to deal with this nested header structure.
*Note:* `RNCodegen` runs all the generators [in a loop](https://github.com/facebook/react-native/blob/main/packages/react-native-codegen/src/generators/RNCodegen.js#L263-L275), assuming that the all have same function signature So I had to add the `headerPrefix` argument to all the generators, even to the ones that don't really need it.
Changelog: [General][Added] - Introduce "headerPrefix" codegen option.
Reviewed By: zeyap
Differential Revision: D51811596
fbshipit-source-id: c5c3e1e571c7c4ea2f5354eb9a7b0df6b917fc0c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41655
This diff adds support for checked-in codegen artifacts for libraries.
It introduces a new property to `codegenConfig`, called `includesGeneratedCode`. If codegen sees `includesGeneratedCode: true` in a project's dependency, it assumes that the library has codegen artifacts in it, and will not generate any code.
Changelog: [General][Added] - Introduce "codegenConfig.includesGeneratedCode" property.
Reviewed By: cipolleschi
Differential Revision: D51207265
fbshipit-source-id: 65855fd846e24a53cb18008839121e99eeb59309
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41621
Currently, if you have a dependency that is alphabetically smaller than `app`, it's evaluation will happen before `app`.
This means that the namespace auto-discovery and the JVM toolchain configuration won't be working and the project will fail to buid.
This fixes it by introducing a root-project Gradle Plugin that takes care of enforcing the evaluation order on the `app` project.
Fixes#41620
Changelog:
[Android] [Fixed] - Fix projects being broken on dependencies starting with `a..`
Reviewed By: huntie
Differential Revision: D51547294
fbshipit-source-id: 65df7149548b7087dd8928e556fb803b3baf7b79
Summary:
CxxReactPackage is supposed to be the way apps register C++-only turbo modules with React Native.
Applications are meant to subclass this jni::HybridObject.
Since this is a jni::HybridObject, applications are meant to create this CxxReactPackage in java, and initialize it with java dependencies.
React Native will reach into its c++ part, and use it create C++-only turbo modules.
NOTE: This is a **temporary** abstraction meant to unblock the stable API effort of removing the turbomodulemanagerdelegate builder from ReactHostDelegate:
https://www.internalfb.com/code/fbsource/[e7efced3018f6178b7187a2358f3b76d40e2b43c]/xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/runtime/ReactHostDelegate.kt?lines=50-51
Changelog: [Internal]
Reviewed By: mdvacca
Differential Revision: D51166523
fbshipit-source-id: 51a22411239fbba32f3a70cc363e59947c2782dc
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41485
Now that React-Hermes does not depends on folly::Futures anymore, we can safely delete the `libevent` dependency.
This will speedup the pod install step and potentially also the bundle size (to be tested)
## Changelog
[Android][Removed] - Remove libevent dependency
Reviewed By: javache
Differential Revision: D51319583
fbshipit-source-id: 155cc3632b005074c43565e7281c9873ab046f0d
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41175
This will make sure that if you specify a maven local folder with `react.internal.mavenLocalRepo`
you're not attempting to fetch artifacts from Maven Central.
Changelog:
[Internal] [Changed] - Do not attempt to query Maven Central if project has react.internal.mavenLocalRepo
ignored-github-export-checks
bypass-github-export-checks
Reviewed By: mdvacca
Differential Revision: D50600815
fbshipit-source-id: f429c2ae9d7204e4aa2cb29357983c0dc3a1aab6
Summary:
As stated here https://github.com/react-native-community/discussions-and-proposals/issues/671 React Native 0.73 will depend on Android Gradle Plugin (AGP) 8.x which requires all libraries to specify a namespace in their build.gradle file, even though this issue was raised many months ago, lots of libraries have not been updated and don't specify a `namespace` inside their build.gradle files
## Changelog:
[ANDROID] [CHANGED] - Ensure namespace is specified for all the 3rd party libraries
Pull Request resolved: https://github.com/facebook/react-native/pull/41085
Test Plan:
Run RNGP tests and test building rn-tester after doing the following procedure
1. Remove `namespace "com.facebook.react"` from react-native/packages/react-native/ReactAndroid/build.gradle
2. Add `package="com.facebook.react"` to react-native/packages/react-native/ReactAndroid/src/main/AndroidManifest.xml
3. Build rn-tester
Also tested this using [BareExpo](https://github.com/expo/expo/tree/main/apps/bare-expo) with AGP 8.1.1 and all libraries that were missing the `namespace` compiled correctly
Reviewed By: cipolleschi
Differential Revision: D50556667
Pulled By: cortinico
fbshipit-source-id: 3d75ec0a8b82427ff0ede89aa7bc58b28b288945
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39540
This simplifies the use of Codegen when creating dev builds of `rn-tester` in the monorepo. It now runs from source for this internal scenario, and this package is now built using the shared monorepo build setup.
Changes:
- Migrate `packages/react-native-codegen` to the shared `yarn build` setup.
- Update package to use `"exports"` field and wrap entry point modules with `babel-register` (NOTE: This is only required for each entry point internally used in the monorepo).
- Fixup small Flow syntax quirks that fail under `hermes-parser`.
- Remove `BuildCodegenCLITask` task from Android build.
- Remove Codegen `build.sh` call from iOS build, use `require.resolve` for `combine-js-to-schema-cli.js` entry point.
Externally significant FYIs:
- `react-native/codegen` is converted to use the `"exports"` field — it should export all `.js` files, as before.
- `codegenPath` is now ignored and marked as deprecated on `ReactExtensions.kt`.
NOTE: TypeScript auto-generation is not yet enabled on this package, since it uses CommonJS `module.exports` syntax (unsupported by `flow-api-translator`).
Changelog: [Internal]
Reviewed By: cipolleschi
Differential Revision: D49370200
fbshipit-source-id: 992913155169912ea1a3cb24cb26efbd3f783058
Summary:
Fix https://github.com/facebook/react-native/issues/40560
## Changelog:
[ANDROID] [FIXED] - Ensure that `configureJavaToolChains` is only executed once during configuration
Pull Request resolved: https://github.com/facebook/react-native/pull/40757
Test Plan:
- Create a fresh `react-native@0.73.0-rc.1` project
- Install `react-native-webview`
- Apply [this patch](https://github.com/react-native-webview/react-native-webview/pull/3175/files) for `react-native-webview` (caused by another issue https://github.com/facebook/react-native/issues/40559)
- Edit `android/gradle.properties` and set `newArchEnabled` to true
- Build application
- (Expected) Application fail to build
- Apply this PR
- (Expected) Application build successfully
**Additional explanation:**
According to the implementation of `configureJavaToolChains`, all the subprojects (both the app and the libraries) will have their toolchains setup in one execution of the method. Therefore, it is okay for the method to be invoked only when configuring the plugin for the app.
On the other hand, invoking the method for more than one time will cause the issue stated in https://github.com/facebook/react-native/issues/40560.
Reviewed By: cipolleschi
Differential Revision: D50361871
Pulled By: cortinico
fbshipit-source-id: bd5e18df97988122788d0482dba954e517a0cb5c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/40935
This is scheduled to land in 0.74, so I'm removed the native integration as this is not needed anymore.
The only thing I left is a stub class to ease the migration out of `ReactNativeFlipper`.
Changelog:
[Android] [Removed] - Remove ReactNative/Flipper Integration
Reviewed By: mdvacca, huntie, cipolleschi
Differential Revision: D50259817
fbshipit-source-id: 28427425340896635607202cd78936f6030e78e0
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/40939
Currently some libs on RN 0.73 are broken as the default for Build Config generation changed
from true to false since AGP 8.x. This reverts the behavior to the old flag.
Closes#40791Closes#40559
Changelog:
[Internal] [Changed] - Make sure buildConfig is turned on for all the 3rd party libraries
Reviewed By: mdvacca
Differential Revision: D50270382
fbshipit-source-id: 02dcb031c577f65be2f41d9da0334c1b3d89e4c5
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39959
We're still accessing project.buildDir which will be removed in Gradle 9.0
I'm cleaning it up here.
Changelog:
[Internal] [Changed] - Fix compilation warnings introduced by Gradle 8.4
Reviewed By: yungsters
Differential Revision: D50016573
fbshipit-source-id: de7a725f61b503f08991ebf85b9a002cefab221a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39634
Running build from source as suggested here:
https://reactnative.dev/contributing/how-to-build-from-source
is currently broken for nightly versions (and for 0.73).
This fixes it by:
- Fixing the import of the Gradle Version Catalog
- Actually adding the Gradle version catalog to the NPM package
- Fixing how the build Codegen CLI task is invoked for build-from-source
- Updating the search directories for codegenDir/reactNativeDir from build-from-source
Changelog:
[Internal] [Fixed] - Unblock build-from-source on nightlies
Reviewed By: cipolleschi
Differential Revision: D49562595
fbshipit-source-id: 9594b7d947569d41c461a7e8287d3ae68fb87b98
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39502
This diff adds the parsing of the package.json to retrieve the version of react native and it matches it against a regex to decide whether to enable or not the New Architecture.
This change depends on [this CLI's PR](https://github.com/react-native-community/cli/pull/2076).
## Changelog:
[Android][Added] - Parse RN Version to decide whether to enable the New Arch or not.
Reviewed By: cortinico
Differential Revision: D49270012
fbshipit-source-id: 5164a1ddd26f1822c0d717a7a9e2416ec38d78a2
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39501
This change introduce a new model to parse the React Native package.json.
The objects are not connected but they will be used in the next diff
## Changelog:
[Android][Added] - Add a couple of types in the RNGP for json parsing.
Reviewed By: cortinico
Differential Revision: D49270044
fbshipit-source-id: 42a855bb85a5f8e1b1249ab3ebee974ce3fb93fd
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38886
This change introduces a property called `react.internal.useHermesNightly`
This allows users building RN-Tester or just ReactAndroid to fetch Hermes from the latest
nightly, without having to build it from source.
The change could be useful to speedup local development, but it should not be enabled on CI or when doing releases.
Changelog:
[Internal] [Changed] - Introduce react.internal.useHermesNightly
Reviewed By: mdvacca, cipolleschi
Differential Revision: D48188769
fbshipit-source-id: cb4330cb9082e9db0c7ba82e48b2d10030637353
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38885
We do have several Gradle Properties that are used to configure the build.
I've refactored them all and moved them inside the PropertyUtils file:
https://github.com/facebook/react-native/blob/main/packages/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/utils/PropertyUtils.kt
Specifically properties should be 'scoped' under `react.` if public, and `react.internal.` if for internal usage.
Property that I cleaned up are:
- REACT_NATIVE_MAVEN_LOCAL_REPO becomes react.internal.mavenLocalRepo
- REACT_WINDOWS_BASH becomes react.internal.windowsBashPath
- GROUP becomes react.internal.publishingGroup
I've also added support for scoping for public properties with backward compat (so both the scoped and unscoped properties are accepted):
- react.newArchEnabled
- react.hermesEnabled
- react.nativeArchitectures
Changelog:
[Android] [Changed] - Cleanup and scope all the Gradle Properties
Reviewed By: mdvacca
Differential Revision: D48188310
fbshipit-source-id: 1a92d31105270a4c2f80029b7d36bcb33916d0fb
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38927
I've done a pass and fixed most of the warnings for Gradle 9:
- project.buildDir is deprecated in favor of project.layout.buildDirectory
- I've updated 3rd party Gradle Plugins that we depend on
There are still two warnings which are outside of our control:
1. One is inside AGP and will be fixed with AGP 8.2 - Source https://issuetracker.google.com/issues/279306626
2. Another one is inside nexus-publish and should ideally be fixed by 2.0 https://github.com/gradle/gradle/issues/25206 Will bump the release once it's out
Changelog:
[Internal] [Changed] - Fix warnings for Gradle 9
Reviewed By: mdvacca
Differential Revision: D48231760
fbshipit-source-id: 27d704324ea33cfc8aa0164fa437b80aab425960
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38903
Currently Android is not rebuilding the CLI if its content changes. This is a bug.
It's resolution is a bit more complicated as we do have various `buildCodegenCLI` tasks, also in user projects.
I've removed the tasks from the user projects, as they're practically not needed (users always consume a prebuilt codegen).
And I've also updated the setup to have only one `buildCodegenCLI` in the ReactAndroid project.
This allows us to ensure the job executes only once and has correct input/outputs.
Changelog:
[Internal] [Changed] - Fix compilation avoidance bug with buildCodegenCLI
Reviewed By: mdvacca
Differential Revision: D48199157
fbshipit-source-id: ba3be6a0ca959ac4e1240e8feb99b8274e4e2b46
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37688
This moves the `ReactNativeFlipper` classes used to configure Flipper on Android from the template to
a separate Gradle artifact that will be published under the coordinates:
```
com.facebook.react:flipper-integration:0.73.x
```
This reduces the footprint of Flipper on the app template and makes easier for user on 0.73 to migrate
to Kotlin (as they will now have to migrate only 2 files rather than 4).
Changelog:
[Android] [Changed] - Move Flipper integration to a separate Gradle module inside `ReactAndroid`
Reviewed By: huntie
Differential Revision: D46441588
fbshipit-source-id: e197f29b7386b52091b8d38ed09bbd8f74a997df
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37019
This bumps the version of AGP to the latest stable.
There was a breaking change in how buildConfig are built which I had to handle.
This also requires a bump of RNGP to work correctly.
Moreover, we now required Java 17 to build Android apps (as that's a AGP requirement).
Changelog:
[Android] [Changed] - Java to 17 and AGP to 8.0.2
Reviewed By: cipolleschi
Differential Revision: D45178748
fbshipit-source-id: 0f302e1f2f2ee56bd3566202fbb5ef67c9b220db
Summary:
Limit diagnostics width output by `hermesc` as they may cause slowdowns or even crashes in Gradle/Xcode when a minified bundle is used as input. This occurs because Hermes is unable to determine the terminal width when executed by Gradle/Xcode, and falls back to "unlimited". If the input is a minified bundle, Hermes will output the whole bundle for each warning.
See issues filed:
- https://github.com/microsoft/rnx-kit/issues/2416
- https://github.com/microsoft/rnx-kit/issues/2419
- https://github.com/microsoft/rnx-kit/issues/2424
## Changelog:
[GENERAL] [FIXED] - Limit diagnostics width output by `hermesc`
Pull Request resolved: https://github.com/facebook/react-native/pull/37531
Test Plan: See listed issues for repros.
Reviewed By: cipolleschi
Differential Revision: D46102686
Pulled By: cortinico
fbshipit-source-id: 1b821cad7ef0d561a5e1c13a7aedf9b10164620a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37494
I'm adding some unit tests to this function that got recently added to support TvOS
Changelog:
[Internal] [Changed] - Add tests for getDependencySubstitutions
Reviewed By: cipolleschi
Differential Revision: D46029402
fbshipit-source-id: 6099242fe9e18f1a612124bc784f90047b4ee286
Summary:
For 3rd party libraries to work with a React Native fork (such as the TV repo) that uses a different Maven group for `react-android` and `hermes-android` artifacts, an additional dependency substitution is required.
## Changelog:
[Android][fixed] RNGP dependency substitutions for fork with different Maven group
Pull Request resolved: https://github.com/facebook/react-native/pull/37445
Test Plan:
- Manual tested with an existing project
- Unit tests pass
Reviewed By: rshest, dmytrorykun
Differential Revision: D45948901
Pulled By: cortinico
fbshipit-source-id: 4151a1d3616172a92c68812c3a0034c98b330d67
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37451
It seems like starting from AGP 7.4, Android is not including the `-DANDROID` flag
anymore from the NDK toolchain.
As we do have several `#ifdef` logic that takes care of having this macro set,
I'm going to make sure it's always set for both ReactAndroid, hermes-engine
and the template.
Changelog:
[Android] [Fixed] - Make sure the -DANDROID compilation flag is always included
Reviewed By: javache
Differential Revision: D45908787
fbshipit-source-id: 07284712d7bcce73dc8ea0dffd4a9d00af4de1d2
Summary:
Nightly builds of Android no longer build due to a recent version format change.
## Changelog:
[ANDROID] [FIXED] - Fixed nightly builds of Android no longer building due to a recent version format change
Pull Request resolved: https://github.com/facebook/react-native/pull/37332
Test Plan:
```
git clone https://github.com/microsoft/react-native-test-app.git
cd react-native-test-app
npm run set-react-version nightly
cd example
yarn android
```
Reviewed By: jacdebug
Differential Revision: D45690926
Pulled By: cortinico
fbshipit-source-id: dc935733607c2b33ba296b507a98f43ba483e348
Summary:
The [React Native TV repo](https://github.com/react-native-tvos/react-native-tvos) shares most of the same Android code as the core repo. Beginning in 0.71, it needs to also publish Android Maven artifacts for the `react-android` and `hermes-android` libraries.
In order to avoid conflicts, it needs to publish the artifacts to a different group name. However, `react-native-gradle-plugin` uses a hardcoded group name (`com.facebook.react`).
Solution: read the group name from the existing `GROUP` property in `ReactAndroid/gradle.properties`.
## Changelog:
[Android] [Fixed] - read GROUP name in gradle-plugin dependency code
Pull Request resolved: https://github.com/facebook/react-native/pull/37204
Test Plan:
- Android unit tests have been added for the new code and new method in `DependencyUtils.kt`.
- Existing tests should pass
- The new code defaults to the correct group (`com.facebook.react`) so no functional change is expected in the core repo.
Reviewed By: luluwu2032
Differential Revision: D45576700
Pulled By: cortinico
fbshipit-source-id: 6297ab515b4bdbb17024989c7d3035b0a2ded0ae
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37220
I'm bumping Kotlin to 1.8.0 to align to the version used internally.
On top of this, I had to configure the JDK toolchain to 11 as Kotlin 1.8
was changing the default version of the stdlib it ships with by default.
This also shields us against problems once we'll bump to AGP 8 which requires
JDK 17 but still allows to produce libraries that are JDK 11 compatible.
Changelog:
[Android] [Changed] - Kotlin to 1.8.0 and JDK Toolchain to 11
Reviewed By: cipolleschi
Differential Revision: D45524689
fbshipit-source-id: 2558b5b6727b5d6e0e1e3cc58f0c6a85ddcefc4d
Summary:
This adds `librrc_legacyviewmanagerinterop.so` to the pickFirst block inside RNGP.
While testing the Fabric Interop layer, I realized that I forgot to add it here and now the build
fires a warning as follows:
```
> Task :app:mergeDebugNativeLibs
2 files found for path 'lib/arm64-v8a/librrc_legacyviewmanagerinterop.so'. This version of the Android Gradle Plugin chooses the file from the app or dynamic-feature module, but this can cause unexpected behavior or errors at runtime. Future versions of the Android Gradle Plugin may throw an error in this case.
Inputs:
- /private/tmp/RNNightly/android/app/build/intermediates/cxx/Debug/194810a4/obj/arm64-v8a/librrc_legacyviewmanagerinterop.so
- /Users/ncor/.gradle/caches/transforms-3/ba1c1d3560a64e70d8218910c5a43605/transformed/jetified-react-android-0.0.0-20230302-2110-caf80d442-SNAPSHOT-debug/jni/arm64-v8a/librrc_legacyviewmanagerinterop.so
```
Changelog:
[Internal] [Changed] - RNGP - Add librrc_legacyviewmanagerinterop to pickfirst config block
Reviewed By: cipolleschi
Differential Revision: D43772845
fbshipit-source-id: cf34bb128b76f18e802a94c41c773f7cb2b7ec4a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36311
Currently, we get the apiVersion/languageVersion for Kotlin that Gradle carries over.
So what happens is that on older version of Gradle, we try to compile RNGP with older versions of Kotlin.
There we have some functions missing (like `.uppercase()`) and the user will fail to build because of this.
Here I'm setting `apiVersion` and `languageVersion` to Kotlin 1.5. Even if we compile with Kotlin 1.7,
the compiler will make sure our code is compatible to be executed in a Kotlin 1.5 environment.
Fixes#36246
Changelog:
[Internal] [Changed] - RNGP - Add apiVersion/languageVersion to 1.5
Reviewed By: cipolleschi
Differential Revision: D43621083
fbshipit-source-id: d74700ff7ef7ac9691965626c2bd0128459fec9b
Summary:
I'm widening the exclude for GenerateCodegenSchemaTask input files.
This is needed before we can migrate to Gradle 8.x as one of the build warning we have is
now converted to a build failure.
The reason why this is needed is because GenerateCodegenSchemaTask ends up picking up a file that
gets generated by `react-native bundle`. While the file is ignored by the Codegen, Gradle
detects a clash between the two tasks.
This solves the issue completely.
Changelog:
[Internal] [Changed] - RNGP - GenerateCodegenSchemaTask should exclude all of `**/build/[generated|intermediate]**`
Reviewed By: cipolleschi
Differential Revision: D43501129
fbshipit-source-id: 49311b833d6b59d4e67e87c535a424a1db1321e6
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36232
Seems like RN Tester is crashing for JSC debug/release.
This happens because RN Tester ends up fetching JSC from Maven Central which contains older versions
of the artifacts (r17) which are not compatible with our setup AND are missing `libjsc.so`.
This is happening as our file layout is a bit different than a regular NPM project so
the repository declaration for JSC, being `../jsc-android/dist` from React Native root ends
in the wrong folder.
In this specifically I:
- Add an excludeModule for "org.webkit:android-jsc" on Maven Central inside RNGP
- Remove the allproject{repositories{}} block which was overriding RNGP configuration
- Add a specific repository declaration inside RN Tester to point to where JSC effectively lives
Changelog:
[Internal] [Changed] - RNGP - Fix RNTester crashing for JSC and safeguard against fetching JSC from Maven Central
Reviewed By: sshic
Differential Revision: D43462015
fbshipit-source-id: db830d7567bbf7dd91412df417418aa61a0ca8fe
Summary:
When building from source, the PrivateReactExtension is getting no defaults (or missing defaults).
Specifically root should point to ../../ (as the build from source will originate
from `./node_modules/react-native`).
Without that root specified, all the subsequent paths are broken,
specifically, the default being `../` causes the codegen to be searched inside:
```
project/node_modules/node_modules/react-native/codegen
```
which is broken
Changelog:
[Internal] [Changed] - RNGP - Fix defaults for PrivateReactExtension
Reviewed By: cipolleschi
Differential Revision: D43435590
fbshipit-source-id: 2ed5e26c1d63fd808fc2d559ea83d6d39d106ff6
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36128
This commit fixes a problem which is making harder to use the New Architecture in monorepos.
Specifically if a user specifies a `codegenDir` in their app, libraries should honor it.
This is not the case today.
The fix is to register an extension on the root project which will "pass" values from app
to libraries.
I've also cleaned up some of the logic in `readPackageJsonFile` function restricting
the access to those functions only to `.root` which is the only field they're accessing.
Fixes#35495
Changelog:
[Android] [Fixed] - Better Monorepo support for New Architecture
Reviewed By: cipolleschi
Differential Revision: D43186767
fbshipit-source-id: 5c5ca39397306120b6b6622cb728633bd331e021