189 Commits
Author SHA1 Message Date
React Native Bot c30b7f8685 Release 0.88.1
#publish-packages-to-npm&latest
2026-10-27 12:09:29 +00:00
React Native Bot 5c35c82cf7 Release 0.88.0
#publish-packages-to-npm&latest
2026-10-15 11:38:19 +00:00
React Native Bot 1a72139b30 Release 0.88.0-rc.6
#publish-packages-to-npm&next
2026-10-14 14:54:05 +00:00
React Native Bot a3249a2e43 Release 0.88.0-rc.5
#publish-packages-to-npm&next
2026-10-12 20:22:35 +00:00
React Native Bot 62e60c3521 Release 0.88.0-rc.4
#publish-packages-to-npm&next
2026-10-05 17:21:13 +00:00
React Native Bot 0782c61fe6 Release 0.88.0-rc.3
#publish-packages-to-npm&next
2026-09-28 09:11:17 +00:00
React Native Bot 215169c51b Release 0.88.0-rc.2
#publish-packages-to-npm&next
2026-09-21 16:15:27 +00:00
React Native Bot 05a41cdc67 Release 0.88.0-rc.1
#publish-packages-to-npm&next
2026-09-15 22:16:48 +00:00
React Native Bot f065722abe Release 0.88.0-rc.0
#publish-packages-to-npm&next
2026-09-08 13:53:53 +00:00
Nivaldo Bondança 63e9c15448 Update ktfmt component on FBS:master
Reviewed By: cortinico

Differential Revision: D112366935

fbshipit-source-id: e0b509473d93d3fb4a465a3007bd0a7b63fa553d
2026-08-02 08:20:26 -07:00
Dawid Malecki 3bfb277fec Download React Native artifacts from the proxy cache server first (#57325)
Summary:
This PR adds pull-through cache support for React Native Maven artifacts by trying `https://repo.reactnative.dev/maven2` before Maven Central for release artifacts.
- Updates the Android Gradle resolution by adding cache repository before `mavenCentral()` scoped to React Native groups via `includeGroupByRegex`.
- Updates iOS CocoaPods prebuilt artifact resolution to try the cache first, then fall back to `https://repo1.maven.org/maven2`.
- Updates SwiftPM/iOS prebuild JS tooling with the same cache-first fallback behavior.
- Preserves `ENTERPRISE_REPOSITORY` behavior as an explicit single custom repository override.
- Avoids duplicate artifact existence probes in Ruby and JS by checking candidate URLs directly and caching JS HEAD results within the process.

## Changelog:

<!-- Help reviewers and the release process by writing your own changelog entry.

Pick one each for the category and type tags:

[ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message

For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->

[GENERAL][CHANGED] - Add React Native Maven pull-through cache fallback for prebuilt artifacts.

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

Test Plan:
Run:

```sh
react-native % RN_DEP_VERSION=0.81.0 \
HERMES_VERSION=250829098.0.13 \
node scripts/ios-prebuild -s -f Debug
```
The logs confirm that React Native artifacts are cached and pulled from the proxy:

```sh
[ReactNativeDependencies] Using download prebuild Debug tarball
[ReactNativeDependencies] Using release tarball from URL: https://rnmaven.swmtest.xyz/com/facebook/react/react-native-artifacts/0.81.0/react-native-artifacts-0.81.0-reactnative-dependencies-debug.tar.gz
[ReactNativeDependencies] Downloading ReactNativeDependencies tarball from https://rnmaven.swmtest.xyz/com/facebook/react/react-native-artifacts/0.81.0/react-native-artifacts-0.81.0-reactnative-dependencies-debug.tar.gz
```

Added gradle plugin tests which can be run with:
```sh
./gradlew :react-native-gradle-plugin:test --tests com.facebook.react.utils.DependencyUtilsTest
```

Reviewed By: cortinico

Differential Revision: D113902346

Pulled By: coado

fbshipit-source-id: 35b257e86d98b0e378f3a642a40a78c498359290
2026-07-28 09:26:45 -07:00
Nivaldo Bondança b31ba29d2d Update ktfmt component on FBS:master
Reviewed By: cortinico

Differential Revision: D110624565

fbshipit-source-id: c18b2b2fc22a8b060a30ae9bd2bc18af862e08f2
2026-07-12 14:57:47 -07:00
generatedunixname1430061942044674 f9ba09d60e Daily arc lint --take KTFMT (#57322)
Summary: Pull Request resolved: https://github.com/react/react-native/pull/57322

Differential Revision: D109548796

fbshipit-source-id: cafd8f9dde536aa94fdf77d58f13a12ba41dc126
2026-06-24 06:24:52 -07:00
Nicola Corti 2f325e22d7 fix(android): restore namespace fallback for libraries not applying the React plugin (#57290)
Summary:
https://github.com/react/react-native/issues/57038 narrowed configureNamespaceForLibraries from a rootProject-wide sweep to only the project applying `com.facebook.react`. That was necessary because the old code re-ran the sweep from every library, and AGP 9 errors when `finalizeDsl` is registered after a project's DSL has been finalized.

The narrowing has a side effect: third-party Android libraries that do NOT apply `com.facebook.react` and still rely on the manifest `package` attribute (e.g. older react-native-linear-gradient) no longer receive a namespace, so they fail under AGP 9 with "Namespace not specified".

Restore the broad coverage by sweeping all `com.android.library` subprojects once, from the application project (which applies the plugin a single time, avoiding the repeated-traversal finalizeDsl error from https://github.com/react/react-native/issues/57038). Guard configureNamespaceForLibraries so it registers its finalizeDsl callback at most once per project, since libraries that DO apply the React plugin are now reachable from both the per-library hook and the app-level sweep.

## Changelog:

[INTERNAL] - restore namespace fallback for libraries not applying the React plugin

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

Test Plan: CI

Reviewed By: fabriziocucci

Differential Revision: D109271897

Pulled By: cortinico

fbshipit-source-id: 8b9d54d9ed1a729a1588f031bc7e7862b21845c5
2026-06-22 07:03:39 -07:00
Alex Hunt ffe3f79495 Standardize secondary package READMEs (#57273)
Summary:
Pull Request resolved: https://github.com/react/react-native/pull/57273

**Motivation**

A README is the first thing an npm visitor sees on each package; internal-repo boilerplate like the "Testing" sections and the "We're using yarn…" note doesn't belong on a published package page.

**Changes**

- Standardize every README: a `# react-native/<name>` heading, a user-facing description, and a blue version badge plus a green monthly-downloads badge.
- Keep the "internal dependency" prelude only on `community-cli-plugin`, `virtualized-lists`, and `js-polyfills`.
- Drop the monorepo-template "Testing" sections and yarn note.
- Rework `metro-config` around the Configuring Metro guide; add missing READMEs for `metro-babel-transformer` and `popup-menu-android`.

Changelog: [Internal]

Reviewed By: emily8rown

Differential Revision: D109017270

fbshipit-source-id: 6208294c4ad2e6235a6605ae54f22d730f0476e7
2026-06-18 07:04:44 -07:00
Rob Hogan dcbd8608a6 Update package.json references to GitHub org "facebook" -> "react" (#57258)
Summary:
Pull Request resolved: https://github.com/react/react-native/pull/57258

Reflecting the move to https://github.com/react/react-native , update references in first-party `package.json`s

The `repository.url` field in particular is load-bearing for Trusted Publish.

Changelog: [Internal]

___

Reviewed By: fabriziocucci

Differential Revision: D108986410

fbshipit-source-id: 78513ffefc32ddf417dc1479a4834ebc44240080
2026-06-18 02:00:52 -07:00
Hur Ali abb071b135 feat: adopt AGP v9 (#57038)
Summary:
This PR is part of Android Gradle Plugin v9 adoption. With this PR, we adopt the AGP9 repository wide and address the deprecated APIs with the newer ones.

This is in combination with https://github.com/facebook/react-native/pull/57038

<details>
<summary>
<b>Changes to `configureBuildConfigFieldsForLibraries` and `configureNamespaceForLibraries`</b>
</summary>

<br/>
These helpers are called from `ReactPlugin.apply`, but they currently iterate over `rootProject.allprojects`. Since `com.facebook.react` is applied by multiple Android library projects, each application of the plugin repeats the same traversal and attempts to register `finalizeDsl` callbacks for every Android library project.

The first traversal can register the callbacks successfully. However, a later traversal can reach a project whose Android DSL finalization phase has already completed. Starting with AGP 9, AGP explicitly errors when `finalizeDsl` is called after that phase has passed, which causes the build failure. [see](https://issuetracker.google.com/issues/436595826)

To understand this, consider following modules:

```
:react-native-safe-area-context
:react-native-mmkv
:react-native-skia
```

The current code on main, would result in executing the following block 3 times:

```kt
  fun configureBuildConfigFieldsForLibraries(appProject: Project) {
    appProject.rootProject.allprojects { subproject ->
      println("=== subproject ${subproject.name}")
      subproject.pluginManager.withPlugin("com.android.library") {
        subproject.extensions
            .getByType(LibraryAndroidComponentsExtension::class.java)
            .finalizeDsl { ext -> ext.buildFeatures.buildConfig = true }
      }
   }
}
```

The output would be:

```
> Configure project: react-native-safe-area-context
=== subproject RNProject
=== subproject app
=== subproject react-native-safe-area-context
=== subproject react-native-mmkv
=== subproject react-native-skia

> Configure project: react-native-mmkv
=== subproject RNProject
=== subproject app
=== subproject react-native-safe-area-context
=== subproject react-native-mmkv
=== subproject react-native-skia

> Configure project: react-native-skia
=== subproject RNProject
=== subproject app
=== subproject react-native-safe-area-context
=== subproject react-native-mmkv
=== subproject react-native-skia
```

Now with AGP9, the same code will throw this error:

```
> Configure project: react-native-safe-area-context
=== subproject RNProject
=== subproject app
=== subproject react-native-safe-area-context
=== subproject react-native-mmkv
=== subproject react-native-skia

> Configure project: react-native-mmkv
=== subproject RNProject
=== subproject app
=== subproject react-native-safe-area-context
=== subproject react-native-mmkv

* What went wrong:
A problem occurred evaluating project': react-native-mmkv'.
> Failed to apply plugin
'com. facebook. react'
> It is too late to call
finalizeDst
as the DSL finalization
blocks have already been executed. \n
In particular, you cannot call 'finalizeDsl' within the "beforeVariants' or "onVariants' blocks.
Instead, you must call finalizeDsl' directly within the
"androidComponents' block
```

**Solution:**

Since these helpers are only intended to configure Android library projects that apply the React plugin, we can configure the current project inside `pluginManager.withPlugin("com.android.library")` instead of repeatedly configuring all projects from every plugin application.

```kt
 fun configureBuildConfigFieldsForLibraries(project: Project) {
    project.extensions
      .getByType(LibraryAndroidComponentsExtension::class.java)
      .finalizeDsl { ext ->
        ext.buildFeatures.buildConfig = true
      }
    }
```

```kt
  fun configureNamespaceForLibraries(project: Project) {
    project.extensions
      .getByType(LibraryAndroidComponentsExtension::class.java)
      .finalizeDsl { ext ->
        if (ext.namespace == null) {
          val manifestFile =
            project.layout.projectDirectory.file("src/main/AndroidManifest.xml").asFile
          manifestFile
            .takeIf { it.exists() }
            ?.let { file ->
              getPackageNameFromManifest(file)?.let { packageName ->
                ext.namespace = packageName
              }
            }
        }
      }
    }
```

One important note for `configureNamespaceForLibraries` is that the old `com.android.build.gradle.LibraryExtension` is deprecated in favor of `com.android.build.api.dsl.LibraryExtension` - which does not expose `manifestFile` from the `sourceSets`. So we have to define a path for it. For most libraries, this should be OK but for the ones which define custom path, this will fail.

Hence, I believe, if it's important to have this fallback, we take this tradeoff. Otherwise, since there has been 2 years passed for AGP8 adoption and the time when this fallback was added, we may safely remove this function as almost all libraries now define a `namespace` in `android { }` DSL.

With the above in place, we make one final change and that is to move these two functions inside the `withPlugin("com.android.library")` as these are only intended for libraries and that way, we also ensure that these will only be applied once the `com.android.library` plugin has been applied.

```kt
    project.pluginManager.withPlugin("com.android.library") {
      configureBuildConfigFieldsForLibraries(project)
      configureNamespaceForLibraries(project)
      configureCodegen(project, extension, rootExtension, isLibrary = true)
    }
```

</details>

## Changelog:

<!-- Help reviewers and the release process by writing your own changelog entry.

Pick one each for the category and type tags:

[ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message

For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->

[ANDROID] [BREAKING] - Adopt AGP v9

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

Test Plan:
- CI passes
- Verified on RN Tester
- Verified on Local RN App

https://github.com/user-attachments/assets/b424c211-6876-42b0-a5d1-f9ecade39a3a

Reviewed By: cipolleschi

Differential Revision: D107656378

Pulled By: cortinico

fbshipit-source-id: 38fd7191e089ce29ccb84fa25bff6d9e920cf322
2026-06-08 03:32:23 -07:00
LeoTM c0ee408c16 Bump Gradle to 9.4.1 (#57078)
Summary:
Follow-up to
- https://github.com/facebook/react-native/pull/55453
  - https://github.com/react-native-community/template/pull/205

Part 1 of Java 26 AGP 9 Kotlin 2.3-4 NDK 28 support https://github.com/facebook/react-native/pull/56222
- bump root gradlew
- bump RNGP gradlew
- bump private\helloworld\android gradlew
  - locally fix missing private\helloworld\node_modules\react-native\sdks\hermes-engine\version.properties
- NB: call gradlew twice
  - once for config (gradle-wrapper.properties)
  - twice for binaries (gradlew, gradle-wrapper.jar)
- NB: gradlew.bat bins remain identical to 9.3.1

## Changelog:

[ANDROID] [CHANGED] - Gradle to 9.4.1

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

Test Plan:
- https://github.com/facebook/react-native/pull/56222
  - RNGP: AGP 9.1 and Kotlin 2.3 thoroughly tested passing (excluding packages/react-native bump for minimality)
- https://github.com/leotm/react-native-template-new-architecture/pull/1933
  - CI passing Android build on Kotlin 2 .3 and RNGP upstream patch

Reviewed By: Abbondanzo

Differential Revision: D107532804

Pulled By: cortinico

fbshipit-source-id: 3c2c98bbc7ed143561cb44347ebdbe1d0757fb71
2026-06-04 10:12:52 -07:00
Satyajit Sahoo c789880517 Handle autolinking for pure C++ turbo modules without includesGeneratedCode (#56938)
Summary:
Currently, pure C++ modules require `includesGeneratedCode: true`, and the library to be shipping codegen files to work. This is inconsistent with regular turbo modules that work with both setups.

The issue is in 2 places:

1. CLI returns hardcoded default for C++ modules
2. Autolinking logic doesn't run codegen for C++ modules

PR removing hardcoded default from CLI: https://github.com/react-native-community/cli/pull/2799

This change updates the autolinking logic to detect pure C++ libraries without `includesGeneratedCode: true`, run codegen for them and use correct path for CMakeLists based on the codegen output.

## Changelog:

[ANDROID] [FIXED] - Fix pure C++ turbo modules not working without `includesGeneratedCode: true`

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

Test Plan:
- create new cpp library: `npx create-react-native-library@latest awesome-library --yes --description "my library" --type turbo-module --languages cpp`
- run `yarn example android` and notice that the build works
- apply the following patch to remove `includesGeneratedCode: true`:
  ```patch
  diff --git a/package.json b/package.json
  index e3c893a..f41100f 100644
  --- a/package.json
  +++ b/package.json
  @@ -112,22 +112,16 @@
          {
            "project": "tsconfig.build.json"
          }
  -      ],
  -      "codegen"
  +      ]
      ]
    },
    "codegenConfig": {
      "name": "AwesomeLibrarySpec",
      "type": "modules",
      "jsSrcsDir": "src",
  -    "outputDir": {
  -      "ios": "ios/generated",
  -      "android": "android/generated"
  -    },
      "android": {
        "javaPackageName": "com.awesomelibrary"
  -    },
  -    "includesGeneratedCode": true
  +    }
    },
    "prettier": {
      "quoteProps": "consistent",
  diff --git a/react-native.config.js b/react-native.config.js
  index fef2c32..46f9600 100644
  --- a/react-native.config.js
  +++ b/react-native.config.js
  @@ -5,7 +5,6 @@ module.exports = {
    dependency: {
      platforms: {
        android: {
  -        cmakeListsPath: 'generated/jni/CMakeLists.txt',
          cxxModuleCMakeListsModuleName: 'react-native-awesome-library',
          cxxModuleCMakeListsPath: 'CMakeLists.txt',
          cxxModuleHeaderName: 'AwesomeLibraryImpl',
  ```
- run `yarn example android` and notice that the build fails
- apply the patch from this PR and from https://github.com/react-native-community/cli/pull/2799 and notice that the module works correctly

screenshot from the test library:

<img width="360" height="780" alt="Screenshot_1779448311" src="https://github.com/user-attachments/assets/a3f43a3c-bb46-404c-80ff-173ea71a9887" />

Reviewed By: cortinico

Differential Revision: D106094034

Pulled By: fabriziocucci

fbshipit-source-id: 1d0058907e7a274a8b7de2ec69539dda70bb8f67
2026-06-01 03:23:20 -07:00
SJLIM 5b16cdff9d Generated from a GitHub Pull Request. Run 'jf sync' on this diff to load the correct commit data. (#56985)
Summary:
Remove duplicated words from comments in a release script, a dev middleware test helper, the Gradle plugin JDK utility, and the virtual view render state.

## Changelog:
[INTERNAL] [FIXED] - Fix duplicated words in source comments.

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

Test Plan: Comments.

Reviewed By: cortinico

Differential Revision: D106615714

Pulled By: fabriziocucci

fbshipit-source-id: cbb08abc5c0e6fbcfe2299c00aa05e67901b9f4c
2026-05-29 12:47:25 -07:00
Phecda 948835d944 fix(gradle-plugin): guard missing autolinked JNI dirs (#56886)
Summary:
Related to https://github.com/facebook/react-native/issues/56334.

`GenerateAutolinkingNewArchitecturesFileTask` currently emits unconditional `add_subdirectory(...)` calls for autolinked New Architecture JNI/codegen directories.

During `clean`, Android Studio native model configuration, or other native cleanup/configuration flows, some dependency codegen directories may not exist yet. CMake then fails before clean/configuration can complete:

```text
add_subdirectory given source ".../android/build/generated/source/codegen/jni/"
which is not an existing directory
```

This changes the generated `Android-autolinking.cmake` to:

- initialize `AUTOLINKED_LIBRARIES` as an empty list;
- only call `add_subdirectory(...)` when the native directory exists;
- append each autolinked target only after its directory has been added.

That keeps existing generated JNI directories linked as before while allowing native clean/model configuration to skip directories that have not been generated yet.

## Changelog:

[ANDROID] [FIXED] - Guard missing autolinked JNI directories in generated CMake during native clean/model configuration.

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

Test Plan:
```sh
./gradlew -p packages/gradle-plugin :react-native-gradle-plugin:test --tests com.facebook.react.tasks.GenerateAutolinkingNewArchitecturesFileTaskTest
```

Result:

```text
BUILD SUCCESSFUL
```

Reviewed By: christophpurrer

Differential Revision: D105826478

Pulled By: cortinico

fbshipit-source-id: e3a698c2334cc02189eefca21b34a0a0181eb5f3
2026-05-20 11:20:46 -07:00
Alex Hunt a0d39e7a9c Bump minimum Node.js version to 22 (#56887)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/56887

Drop support for Node.js 20. The minimum supported version is now `^22.13.0 || ^24.3.0 || >= 26.0.0`.

Node.js 20 reached end-of-life in April 2026 and is no longer actively maintained. This aligns React Native with the upcoming Metro requirement.

Changelog:
[General][Breaking] - Require Node.js >= 22.13.0

Reviewed By: christophpurrer, cortinico

Differential Revision: D105685641

fbshipit-source-id: f490e5a13e4289daba98c4d56dd8fdd341aef0db
2026-05-19 11:53:54 -07:00
Nicola Corti ec1e1ae054 Bump Kotlin API version from 1.9 to 2.0 (#56849)
Summary:
Kotlin 2.2.0 deprecated API versions 1.8 and 1.9, which causes a build failure when combined with -Werror. Bump apiVersion to KOTLIN_2_0 in all four gradle-plugin build files.

## Changelog:

[ANDROID] [CHANGED] - Bumped min Kotlin version to 2.0+

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

Test Plan: CI

Differential Revision: D105322296

Pulled By: cortinico

fbshipit-source-id: 729f4475e6f026032d3d0a34f4322eeb29e6a5a8
2026-05-15 08:50:05 -07:00
Nicola Corti cb04956cde Bump Kotlin to 2.2.0 (#56838)
Summary:
Bump to Kotlin 2.2.0 to align with internal builds

## Changelog:

[Android] [Changed] - Bump Kotlin to 2.2.0

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

Test Plan: CI

Differential Revision: D105298435

Pulled By: cortinico

fbshipit-source-id: eae5f9f19a66d15f4451ea369ad032e8acef0aff
2026-05-15 07:22:39 -07:00
Riccardo Cipolleschi b05ab2f8d8 Update stale 'Hermes V1' comments (#56757)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/56757

Update comments that still say 'Hermes V1' as if it is an opt-in feature.
Since Hermes (formerly called Hermes V1) is now the only supported engine:
- hermes-engine.podspec: drop 'when using Hermes V1' from hermesc note
- PathUtils.kt: rewrite the hermesc path comment to drop the 'opted in to Hermes V1' phrasing
- hermes-engine/build.gradle.kts: 'Hermes V1 by default...' -> 'Hermes by default...'

## Changelog:
[Internal] -

Reviewed By: cortinico

Differential Revision: D104649634

fbshipit-source-id: 9b0a05ed013c7ba908c7abe467d5e3c1c3c2f26c
2026-05-11 12:55:12 -07:00
Riccardo Cipolleschi 0a5c8c6b4b Remove hermesV1Enabled Gradle property and simplify Hermes version resolution (#56733)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/56733

  - Remove `hermesV1Enabled` / `react.hermesV1Enabled` Gradle property and all branching it controls
  - Rename `HERMES_V1_VERSION_NAME` to `HERMES_VERSION_NAME` in `version.properties`
  - Remove `hermesV1Enabled` from `PrivateReactExtension`, `ProjectUtils`, `PropertyUtils`, `ReactPlugin`
  - Simplify `DependencyUtils.Coordinates` to single Hermes version
  - Make `-DHERMESVM_HEAP_HV_MODE=HEAP_HV_PREFER32` CMake flag unconditional
  - Remove `-DHERMES_V1_ENABLED=1` CMake argument from `ReactAndroid` and Fantom builds
  - Delete `hermesV1Enabled=true` from `gradle.properties`
  - Update all Gradle plugin tests

## Changelog:
[Android][Removed] - Remove hermesV1Enabled and simplify the code

  ## Test plan
  - [x] Gradle plugin: `./gradlew -p packages/gradle-plugin build` — BUILD SUCCESSFUL, all tests pass
  - [x] Android: `./gradlew :packages:rn-tester:android:app:assembleDebug` — BUILD SUCCESSFUL

Reviewed By: cortinico

Differential Revision: D104244582

fbshipit-source-id: 7d12af5b934aac9d431e89d9a2eac41213c997a1
2026-05-11 12:55:12 -07:00
Christoph Purrer 734f5c180d Migrate NativeSampleTurboModule to codegen integration - RFC (#56723)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/56723

Replace hand-written spec files for `NativeSampleTurboModule` with proper codegen integration by removing exclusion rules and configuring the module in `package.json`. This eliminates ~1600 lines of manual boilerplate (Java, C++, Objective-C) across Android, iOS, and macOS platforms, allowing the codegen system to generate these files automatically from the JavaScript spec.

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D104323543

fbshipit-source-id: 241f256d03a4ff0f914179c5ee2842d29fad5554
2026-05-11 11:24:46 -07:00
Rob Hogan 783f45746e Bump packages to 0.87.0-main following 0.86 cut (#56716)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/56716

Now that we've cut 0.86, bump all versions on `main` ready for the 0.87 cut.

Changelog: [Internal]

Reviewed By: cortinico, fabriziocucci

Differential Revision: D104219534

fbshipit-source-id: 86f2ebe5b44f67608a7a9495bf9840f2cdd52e5b
2026-05-07 07:23:06 -07:00
Luís Chaves 664acaf441 fix: upgrade foojay-resolver-convention to 1.0.0 (#56210)
Summary:
foojay-resolver-convention's version 0.5.0 is not compatible with Gradle 9. (https://github.com/gradle/foojay-toolchains/issues/151)
When trying to build for Android on React Native 0.8.2, we are presented with
```
java.lang.NoSuchFieldError: Class org.gradle.jvm.toolchain.JvmVendorSpec does not have member field 'org.gradle.jvm.toolchain.JvmVendorSpec IBM_SEMERU'
	at org.gradle.toolchains.foojay.DistributionsKt.<clinit>(distributions.kt:16)
	at org.gradle.toolchains.foojay.FoojayApi.fetchDistributionsIfMissing(FoojayApi.kt:62)
	at org.gradle.toolchains.foojay.FoojayApi.match$foojay_resolver(FoojayApi.kt:49)
	at org.gradle.toolchains.foojay.FoojayApi.toLinks(FoojayApi.kt:41)
```

## Changelog:

<!-- Help reviewers and the release process by writing your own changelog entry.

Pick one each for the category and type tags:

[ANDROID] [CHANGED] - changed foojay-resolver-convetion version to 1.0.0

For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests

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

Test Plan: After making the change, the app build without problems.

Reviewed By: fabriziocucci

Differential Revision: D98883905

Pulled By: cortinico

fbshipit-source-id: 18bfbba0e6af1aee660cee13c68c20bab75506d9
2026-03-31 04:07:33 -07:00
Simek b1e2e5a68e Do not include test files in gradle-plugin bundle (#56193)
Summary:
While analysing dependency trees of several React Native libraries I have spotted that `react-native/gradle-plugin` package bundle includes test files.

This PR adds the exclude rule in package.json `files` array which prevents from adding test files to the dist.

## Changelog:

[INTERNAL] [CHANGED] - Do not include test files in `react-native/gradle-plugin` package bundle

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

Test Plan:
```
npm pack --dry-run
```

### Before

<img width="1026" height="302" alt="Screenshot 2026-03-23 at 13 46 43" src="https://github.com/user-attachments/assets/22e0458f-b4ee-4ffe-8c5c-21204be1f983" />

### After

<img width="1026" height="302" alt="Screenshot 2026-03-23 at 13 46 59" src="https://github.com/user-attachments/assets/9c558a5b-3720-424b-9f6f-bb79048454bb" />

Reviewed By: christophpurrer

Differential Revision: D97753123

Pulled By: cortinico

fbshipit-source-id: 98b614115fca56b9abcbbd54109053689805b175
2026-03-23 09:34:14 -07:00
Alan Lee bbaabe6a16 Bump packages for next release (#55946)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55946

Follows the recent `0.85-stable` branch cut.

Changelog: [Internal] - Bump all packages to `0.86.0-main`

Reviewed By: cortinico

Differential Revision: D95410323

fbshipit-source-id: dacfee00f1111dbf57ef2e608963a4bffa669884
2026-03-10 00:35:59 -07:00
Alexander Martinz 6f54846a08 Allow overriding dev server ip via property (#55531)
Summary:
Similiar to how a specific port can be set also allow for setting a specific ip for the dev server.

This allows for easy configuration to aid in generating [reproducible builds](https://izzyondroid.org/docs/reproducibleBuilds/).

## Changelog:

<!-- Help reviewers and the release process by writing your own changelog entry.

Pick one each for the category and type tags:

[ANDROID] [ADDED] - Allow specifying dev server ip via gradle property

For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->

[ANDROID] [ADDED] - Allow specifying dev server ip via gradle property

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

Test Plan:
1) Add `reactNativeDevServerIp=localhost` to `gradle.properties`
2) Generate an APK
3) Analyze the APK and check that the value of the string resource type `react_native_dev_server_ip` matches the value set in `gradle.properties`.

Reviewed By: cortinico

Differential Revision: D93143296

Pulled By: CalixTang

fbshipit-source-id: d0be23e9495f0ba1a6034dc31b6e725fd94a6a02
2026-02-13 09:55:21 -08:00
Nicola Corti 319e589d3d Bump Gradle to 9.3.1 (#55453)
Summary:
This advances our Gradle version to the latest stable

## Changelog:

[ANDROID] [CHANGED] - Gradle to 9.3.1

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

Test Plan: CI

Reviewed By: cipolleschi

Differential Revision: D92529174

Pulled By: cortinico

fbshipit-source-id: 252ed969e9198758cfe69dc74bb69e2a5c50a347
2026-02-10 07:41:08 -08:00
Tomasz Żelawski 45896674d1 fix: inability to disable hermesV1 on Android (#55399)
Summary:
Changing the line in `ReactPlugin.kt` that always set `hermesV1Enabled` to `true` even if it was explicitly disabled, accidentally omitted in https://github.com/facebook/react-native/issues/54989.

In recent update of hermes V1 binary a file `RuntimeAdapter.h` was removed.

## Changelog:

[ANDROID] [FIXED] - ReactPlugin.kt always setting `hermesV1Enabled` to `true`

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

Test Plan: Build React Native from source on latest 0.84 RC, disable hermesV1 and see that it compiles now.

Reviewed By: cipolleschi

Differential Revision: D92267385

Pulled By: cortinico

fbshipit-source-id: 58ecae6d3064995ef9e63ddbd67ac04db2a1126b
2026-02-05 03:38:47 -08:00
Sergei Glotov 47c3ebe23f Add Sonatype Central repository for users of nightly builds only (#55305)
Summary:
Even though Sonatype Central repository isn't used by an app, still the React Native Gradle plugin adds the Sonatype Central to repositories.
In some cases it leads to a considerable amount of failed requests on Gradle downloading dependencies.

<img width="1076" height="109" alt="858 failed requests out of 858 requests" src="https://github.com/user-attachments/assets/40d6aeb6-dcc4-4ebb-9f0b-742d26ba6e65" />

I'm introducing a change where Sonatype Central repository is included for users of nightly builds only.

## Changelog:

[ANDROID] [CHANGED] - Add Sonatype Central repository for users of nightly builds only

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

Test Plan:
All of the tests in gradle plugin are green
```
$ ./gradlew test

BUILD SUCCESSFUL in 10s
20 actionable tasks: 20 executed
```

Reviewed By: cipolleschi

Differential Revision: D91887976

Pulled By: cortinico

fbshipit-source-id: 1e61d3b8d97a444e17a02bfe9ed0334e9b0ab0bc
2026-02-03 09:11:00 -08:00
Alex Hunt f1bedfb92b Bump packages for next release (#55172)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55172

Follows the recent `0.84-stable` branch cut.

Changelog: [Internal] - Bump all packages to `0.85.0-main`

Reviewed By: vzaidman

Differential Revision: D90698490

fbshipit-source-id: b81b840bfd66e631f160a11c4c64baa6850e3393
2026-01-14 12:17:16 -08:00
Rob Hogan c9c601d61a Node.js: Drop support for Node.js versions released before 20.19.4, and EOL v21,v23 (#55114)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55114

Our official [docs](https://reactnative.dev/docs/set-up-your-environment#node--watchman) require:

> Node 20.19.4 or newer

Currently, our `package.json#engines` fields express this as `"node": ">= 20.19.4"`

This is a bit imprecise because of Node's overlapping release lines - e.g. v24.0.0 is actually older than v20.19.4 (2025-07-15), and the whole v21 line was already EOL before v20.19.4.

The release *date* is relevant because Node.js frequently backports the most important updates - notably, `require(esm)` is already stable in Node 20.19 but is not unflagged in v22 until v22.12.

This makes the `package.json#engines` requirement truer to the documented requirement, dropping some old minors and EOL majors that prevent us using features included in v20.19.

Notably, `require(esm)` is stable and unflagged on all versions supported from this diff.

 - v21 and v23 are EOL, so are dropped.
 - v22.13 pre-dates 20.19.4 and is the first to have unflagged silent `require(esm)`
 - v24.3.0 pre-dates 20.19.4 and is the first to unflag TS-stripping
 - Support v25 and newer.

Changelog:
[General][Breaking] Drop support for EOL Node.js lines and old minors.

Reviewed By: cortinico, huntie

Differential Revision: D90467358

fbshipit-source-id: a5fdfb1b93a9d6cffe78eb6811ff7420ab906f44
2026-01-14 10:49:05 -08:00
Rob Hogan 0cda10b00a Revert: Bump minimum Node.js version to v22.11 (prev LTS) (#55113)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55113

Reverts https://github.com/facebook/react-native/pull/55038

Dropping v20 (still in LTS) causes friction with Expo's LTS policy, so we're restoring support for v20.19.

Changelog: [General][Added] Revert https://github.com/facebook/react-native/pull/55038

Reviewed By: shwanton

Differential Revision: D90467161

fbshipit-source-id: d876cf7869f11e04058f88239f553704e0706514
2026-01-11 14:30:40 -08:00
Riccardo Cipolleschi f140c4906b Use Hermes V1 as default engine (#54989)
Summary:
This change makes Hermes V1 the default engine for React Native for both platforms. This change needs to land before the branch cut of react native 0.84

bypass-github-export-checks

## Changelog:
[iOS][Changed] - Make Hermes V1 the default engine for iOS

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

Test Plan:
1. Run `bundle exec pod install` and verified that Hermes V1 is used when building from source
<img height="480" alt="Simulator Screenshot - iPhone 17 Pro - 2025-12-29 at 11 28 44" src="https://github.com/user-attachments/assets/0889f16c-f2ee-4a0e-9a4d-529dd82c8283" />
2. Run `prebuild-ios -s` and verified that the scripts downloads the Hermes V1 tarball
<img width="831" height="324" alt="Screenshot 2025-12-29 at 10 37 53" src="https://github.com/user-attachments/assets/9a60565e-1e13-4967-a4a4-dd079e6b040f" />
3. GHA and nightlies

Reviewed By: vzaidman, cortinico, huntie

Differential Revision: D89881943

Pulled By: cipolleschi

fbshipit-source-id: 958b6d31bd4230ba4a5c7fee2bffc19e03dcbc89
2026-01-07 05:34:12 -08:00
Rob Hogan 8f10b339d4 Breaking: Bump minimum Node.js version to v22.11 (prev LTS) (#55038)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55038

Bump the minimum to Node.js v22.11, which is the previous LTS now that v24 is in LTS. Drop support for Node v20.

https://nodejs.org/en/blog/release/v22.11.0
https://nodejs.org/en/about/previous-releases

Changelog: [General][Breaking] Bump minimum Node.js version to v22.11

Reviewed By: cortinico, huntie

Differential Revision: D90109056

fbshipit-source-id: 178f29d3131f21fccf956decc9ac94365a2bfe53
2026-01-05 06:21:25 -08:00
Jakub Piasecki 076e6a1d53 Use prebuilt Hermes by default when building Android (#54707)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54707

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D87929652

fbshipit-source-id: 439eef5eea9b9203cf2a7b5a8eae38d83e192bd5
2025-12-15 08:13:16 -08:00
Tomasz Żelawski dd1f83e616 fix: RNGP CCache compatibility (#54829)
Summary:
Invoking `Runtime.getRuntime().exec()` is not compatible with Gradle Configuration Cache and providers should be used instead.

This error hasn't surfaced yet due to fact that this branch of code is rarely hit as the users usually provide correct path to the CLI in their `app/build.gradle` file. I stumbled upon it accidentally when bumping RN in monorepo and the CLI path was no longer valid.

Re-opened due to failing tests in the previous PR https://github.com/facebook/react-native/issues/54801

## Changelog:

[ANDROID] [FIXED] - RNGP using node invocation non-compatible with Gradle Compilation Cache

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

Test Plan:
I tested it in a rnc-cli app, where I provided an invalid path for `cliFile` - the error was fixed after applying this patch.

`./gradlew -p packages/gradle-plugin/ test` now works properly.

Reviewed By: mdvacca

Differential Revision: D88757054

Pulled By: cortinico

fbshipit-source-id: 07b86f8cf4d242dee30b97b7768602ff9b60ed54
2025-12-10 07:25:29 -08:00
Nicola Corti b1b2cab158 Back out "fix: RNGP using node invocation non-compatible with Gradle Compilation Cache"
Summary:
Original commit changeset: a91e47b90937

Original Phabricator Diff: D88492310

bypass-github-export-checks

Reviewed By: javache

Differential Revision: D88727116

fbshipit-source-id: 847c78776d9628448811158673ac8530e09a8238
2025-12-09 02:57:25 -08:00
Tomasz Żelawski dc73ec438a fix: RNGP using node invocation non-compatible with Gradle Compilation Cache (#54801)
Summary:
Invoking `Runtime.getRuntime().exec()` is not compatible with Gradle Configuration Cache and providers should be used instead.

This error hasn't surfaced yet due to fact that this branch of code is rarely hit as the users usually provide correct path to the CLI in their `app/build.gradle` file. I stumbled upon it accidentally when bumping RN in monorepo and the CLI path was no longer valid.

## Changelog:

[ANDROID] [FIXED] - RNGP using node invocation non-compatible with Gradle Compilation Cache

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

Test Plan: I tested it in a rnc-cli app, where I provided an invalid path for `cliFile` - the error was fixed after applying this patch.

Reviewed By: mdvacca, huntie

Differential Revision: D88492310

Pulled By: cortinico

fbshipit-source-id: a91e47b90937945066bde938bdf16b2550322afb
2025-12-08 03:37:13 -08:00
riteshshukla04 5bb3a6d68d fix: Use FQCN to avoid collisions in PackageList.java (#54736)
Summary:
When two different React Native libraries export a package class with the same name but in different namespaces, the generated PackageList.java causes a compilation error due to ambiguous class references.

The current autolinking generates:
``` kotlin
import com.pikachu.NativeStorage;
import com.snowfox.NativeStorage;  // ❌ Compile error: NativeStorage is already defined

public ArrayList<ReactPackage> getPackages() {
    return new ArrayList<>(Arrays.<ReactPackage>asList(
        new MainReactPackage(mConfig),
        new NativeStorage(),  // ❌ Ambiguous reference
        new NativeStorage()   // ❌ Ambiguous reference
    ));
}
```
Solution:-
Use fully qualified class names (FQCN) instead of imports:
``` kotlin
// No imports needed
public ArrayList<ReactPackage> getPackages() {
    return new ArrayList<>(Arrays.<ReactPackage>asList(
        new MainReactPackage(mConfig),
        // pikachu-storage
        new com.pikachu.NativeStorage(),
        // snowfox-storage
        new com.snowfox.NativeStorage()
    ));
}
```

## Changelog:

<!-- Help reviewers and the release process by writing your own changelog entry.

Pick one each for the category and type tags:

[ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message

For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->
[ANDROID][FIXED]- Use FQCN to avoid collisions

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

Test Plan:
Updated test.
Also tested on my app and RN tester
<img width="687" height="223" alt="image" src="https://github.com/user-attachments/assets/fe54d0c3-4ab4-4d74-a98f-97243851e8c4" />

CI will tell if build fails

Reviewed By: mdvacca

Differential Revision: D88157961

Pulled By: cortinico

fbshipit-source-id: 5fe072dcaed177af1036ca88d55870081a3f4205
2025-12-03 09:26:55 -08:00
Alex Hunt a1e534a604 Bump packages for next release (#54452)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54452

Follows the recent `0.83-stable` branch cut.

Changelog: [Internal] - Bump all packages to `0.84.0-main`

Reviewed By: cipolleschi

Differential Revision: D86534507

fbshipit-source-id: 47b88dce919857398f41516d03d60259730d2887
2025-11-12 04:22:19 -08:00
Jakub Piasecki 27bb34c006 Always use Hermes artifacts published from Hermes repository (#53833)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53833

Changelog: [GENERAL][CHANGED] - Use Hermes artifacts published independently from React Native

Reviewed By: cortinico

Differential Revision: D82626463

fbshipit-source-id: 99a34a34c53b7f8f1c0da3da8a0e750e42a2e9b7
2025-10-22 09:48:13 -07:00
Nicola Corti 50b1bec2d5 RNGP - Move matchingFallbacks to be called inside maybeCreate("debugOptimized") (#54186)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54186

The `marchingFallback` directive is applied directly on the build type.
However here is invoked inside the `externalNativeBuild` making it confusing, because in reality
it has nothing to do with `externalNativeBuild`. So I'm moving it to the correct location
(this has no effect on the build setup, is just to make the code easier to read).

Changelog:
[Internal] [Changed] -

Reviewed By: cipolleschi

Differential Revision: D84921628

fbshipit-source-id: 064336ad64a8e1de20b747276f6e5ca7ce7cb677
2025-10-20 08:01:26 -07:00
Nicola Corti 69dc655005 RNGP - Fix build failures encounted with AGP 9.0.0-alpha05 - Round 1 (#53778)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53778

I've been looking into the next major bump of AGP to 9:
https://developer.android.com/build/releases/agp-preview#android-gradle-plugin-built-in-kotlin

This change adapts our project so that it keeps on buildign with AGP 8
(as the bump to 9 would be a breaking change), but it addresses some of the build
failures we'll be having with AGP 9:

- Set `resValues` build option to true (default was changed true -> false in AGP 9)
- Opts out our project from `android.builtInKotlin` and `android.newDsl` for the time being.

Changelog:
[Android] [Fixed] - Fix build failures with RNGP due to AGP 9.0.0-alpha05

Reviewed By: alanleedev

Differential Revision: D82452555

fbshipit-source-id: 99561f039bf943f5ce99008ce073ca86431cfaed
2025-10-13 18:16:18 -07:00
Nicola Corti d9a582e949 Bump packages to 0.83.0-main (#54009)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54009

Packages haven't been bumped on main ahead of 0.83. This takes care of it.

Changelog:
[Internal] [Changed] -

Reviewed By: cipolleschi, huntie

Differential Revision: D83580515

fbshipit-source-id: 7471e77f74e3fb3b4ee6538a49369b5df1393098
2025-10-01 07:13:33 -07:00