SIGN IN SIGN UP
facebook / react-native UNCLAIMED

A framework for building native applications using React

Update file paths to use rootProject reference (#55992)

Summary:
A recent commit created a regression in what can be done with `build.gradle.kts` by what looks like non intentional usage of File() over rootProject.file().

It is very useful for out-of-tree platforms (such as my react native for unreal engine) to be able to wrap this build gradle file, and using File() breaks things because it breaks lookup in that use case.

This PR fixes this unintentional regression by using `rootProject.file`, as it is used elsewhere in this file.

## Changelog:

Changed `File()` to `rootProject.file()` in lines introduced by new commit (https://github.com/facebook/react-native/commit/076e6a1d53467ca1ff00399971bb333477abcc48)

Pick one each for the category and type tags:

[GENERAL] [FIXED] - Fix build regression by using rootProject.file

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

Test Plan: Build project as usual.

Reviewed By: NickGerleman

Differential Revision: D95823119

Pulled By: cortinico

fbshipit-source-id: 6882802439c3683d3cc7507e55bb3513e2300ecc
D
Danny Povolotski committed
8a8f1b801c253a2e582e0d7615b67efe88328ca3
Parent: 3612f53
Committed by meta-codesync[bot] <215208954+meta-codesync[bot]@users.noreply.github.com> on 3/10/2026, 5:13:09 PM