Commit Graph

5 Commits

Author SHA1 Message Date
Dmitry Rykun a44dd57f10 Update codegen artifacts for react-native-test-library (#45164)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45164

Some changes have been made to the codegen since `react-native-test-library` was published. This diff updates the generated artifacts in that library.
Changelog: [Internal]

Reviewed By: fkgozali

Differential Revision: D59010093

fbshipit-source-id: f11ccd3645da72d45c70581e485f8546166ca182
2024-06-25 09:57:04 -07:00
Nicola Corti cf914e412d RNGP - Autolinking. Add support for linking projects. (#44799)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44799

This is the final part of core autolinking:
1. I split RNGP into an `app-plugin` and a `settings-plugin`. This was necessary as the Gradle modules need to be loaded inside the settings.gradle.kts.
2. I've introduced a Settings Plugin to take care of either invoking the `config` command from CLI or receiving a file in input.
3. I've removed the former `RunAutolinkingConfigTask` as now the command is invoked inside the settings plugin
4. I've added hashing computed based on the lockfiles so we won't be re-executing teh `config` command if the lockfiles are not changed.
5. I've updated RN-Tester to use the core autolinking rather than manual linking for the 2 libraries it's using.

Changelog:linking
[Internal] [Changed] - RNGP - Autolinking. Add support for linking projects

Reviewed By: blakef

Differential Revision: D58190363

fbshipit-source-id: 6ab8b36729e77ca715f50a4a00aa0ca4eb5b63b1
2024-06-07 10:32:16 -07:00
Nicola Corti 44e78ff74a Fix accidentally broken build_android job
Summary:
I accidentally broke build_android.
Here the two fixes:
1. Make sure the constructor of PackageList2 are actually called `PackageList2`
2. Make sure the package of `OSSLibraryExamplePackage` is `com.facebook.react.osslibraryexample`

Changelog:
[Internal] [Changed] - Fix accidentally broken build_android job

Reviewed By: dmytrorykun

Differential Revision: D56756601

fbshipit-source-id: 862597ca829d702d880624d29276193f8548715d
2024-04-30 08:02:20 -07:00
Rob Hogan b0f6a05650 Fix @react-native/oss-library-example package.json#exports (#44179)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44179

Fix `package.json#exports` main entry point in `react-native/oss-library-example` (which is actually at `packages/react-native-test-library`), to fix a Metro resolver warning on building RN-tester.

`"./": "./index.js"` is intended as an export map entry for the main export, whereas `".": "./index.js"` is correct (see [`PACKAGE_EXPORTS_RESOLVE`](https://nodejs.org/api/esm.html) spec).

Changelog: [Internal]

(This package is not published)

Reviewed By: cortinico, dmytrorykun

Differential Revision: D56414480

fbshipit-source-id: 01874cf11ae687aaf5aa5aa56075232f03d691b8
2024-04-22 05:23:04 -07:00
Dmitry Rykun 1cb0a3342a Add react-native-test-library package (#43068)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/43068

This diff adds `react-native-test-library` package.
It contains native module and native component example, and targets both the new and the old architecture. It has structure similar to many OSS React Native libraries, and is supposed to be used to test the integration with third-party libraries.

It is integrated with RNTester as the **OSS Library Example** screen.

{F1457510909}

**Change Background** tests native commands.
**Set Opacity** tests native props.
**Get Random Number** tests native module.

Changelog: [Internal]

Reviewed By: RSNara

Differential Revision: D50793835

fbshipit-source-id: ff6daefab10e6e9f13049e3013f8f63cfa8a929e
2024-04-09 11:35:43 -07:00