Account for REACT_NATIVE_DOWNLOADS_DIR inside fantom (#55148)

Summary:
Currently Fantom is completely ignoring the `REACT_NATIVE_DOWNLOADS_DIR` env variable that other scripts in the repo are instead honoring. This fixes it.

## Changelog:

[INTERNAL] -

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

Test Plan: CI

Reviewed By: cipolleschi

Differential Revision: D90594286

Pulled By: cortinico

fbshipit-source-id: 872a26fc15a2acbe3c0e26035407159c20a9a285
This commit is contained in:
Nicola Corti authored and meta-codesync[bot] committed 2026-01-13 10:34:10 -08:00
1 parent 2aee426378
commit ebf117ca95
1 file changed
+7 -2
+7 -2
View File
@@ -50,7 +50,12 @@ val reactNativeRootDir = projectDir.parentFile.parentFile
val reactNativeDir = File("$reactNativeRootDir/packages/react-native")
val reactAndroidDir = File("$reactNativeDir/ReactAndroid")
val reactAndroidBuildDir = File("$reactAndroidDir/build")
val reactAndroidDownloasdDir = File("$reactAndroidBuildDir/downloads")
val reactAndroidDownloadsDir =
if (System.getenv("REACT_NATIVE_DOWNLOADS_DIR") != null) {
File(System.getenv("REACT_NATIVE_DOWNLOADS_DIR"))
} else {
File("$reactAndroidBuildDir/downloads")
}
val testerDir = File("$projectDir/tester")
val testerBuildDir = File("$buildDir/tester")
@@ -65,7 +70,7 @@ val createNativeDepsDirectories by
reportsDir.mkdirs()
}
val downloadFollyDest = File(reactAndroidDownloasdDir, "folly-${FOLLY_VERSION}.tar.gz")
val downloadFollyDest = File(reactAndroidDownloadsDir, "folly-${FOLLY_VERSION}.tar.gz")
val prepareFolly by
tasks.registering(Copy::class) {