Commit Graph

36 Commits

Author SHA1 Message Date
Nicola Corti d0a5f8ff51 Gradle to 8.10 (#46369)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46369

This bumps Gradle to the latest stable ahead of the 0.76 branch cut.

Changelog:
[Android] [Changed] - Gradle to 8.10

Reviewed By: tdn120, Abbondanzo

Differential Revision: D62296898

fbshipit-source-id: 59fc119dd6fad3b6b0ebbfcd8166da4cad9b8633
2024-09-06 09:28:13 -07:00
Vitali Zaidman b37101486b update babel and fix tests accordingly (#46295)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46295

X-link: https://github.com/facebook/metro/pull/1343

Updated all **babel** packages in all `package.json` across the repo and ran `npx yarn-deduplicate yarn.lock --scopes babel`. Afterwards, fixed the following issues appearing as a result of that (squashed the following initially separate diffs to make this packages update work atomically):
### (D61336392) updated jest snapshot tests failing
### (D61336393) updated babel types and corrected typings accordingly
The latest babel 7 introduces the following features we need to adjust our types to:
* `JSXNamespacedName` is removed from valid `CallExpression` args ([PR](https://github.com/babel/babel/pull/16421))
  * `JSXNamespacedName` is used for namespaced XML properties in things like `<div namespace:name="value">`, but `fn(namespace:name)` doesn't make any sense.
* Dynamic imports are enabled behind a new flag `createImportExpressions` ([PR](https://github.com/babel/babel/pull/15682)), introducing calls such as `import(foo, options)`. These complicate the expected values passed to `import` to be more than just strings.
  * Since these are behind a flag that is not expected to be enabled, we can throw an error for now and whoever uses it can add a support to it if needed later.

### Added a new metro ENV ignore
`BROWSERSLIST_ROOT_PATH` is set to `""` explicitly in `xplat/js/BUCK`
and then ignored in
`js/tools/metro-buck-transform-worker/src/EnvVarAllowList.js`

Reviewed By: robhogan

Differential Revision: D61543660

fbshipit-source-id: abbcab72642cf6dc03eed5142eb78dbcc7f63a86
2024-09-05 07:11:17 -07:00
Alan Lee 1333e0ee6a update compileSdk to 35 (#46235)
Summary:
X-link: https://github.com/facebook/yoga/pull/1692

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

Update compileSdk to 35 before adding relating work for Android 15

Changelog:
[Android][Added] - Update compileSdk to 35

Reviewed By: cortinico

Differential Revision: D61874541

fbshipit-source-id: f7c92dc15aa68a53bcd626450c515d2f24e9e40f
2024-08-29 09:17:42 -07:00
Soe Lynn e1a1cdacf2 Update RNTester and HelloWorld to min iOS 15.1 (#46136)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46136

Changelog:
[iOS] - Update RNTester and HelloWorld template app to `min iOS 15.1`

Reviewed By: philIip, blakef

Differential Revision: D61604036

fbshipit-source-id: 9260b9b51a9c976792fd9d705b9b6a35a88a7f86
2024-08-21 12:11:58 -07:00
Alan Lee 60c38c37aa Update helloworld tempate to minSdk 24 (#45905)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45905

- Updating minSdk to 24 before we do the update for the RN

Changelog: [Internal]

Reviewed By: blakef

Differential Revision: D60788291

fbshipit-source-id: d21d766159a04d79547e64fca802600279d08255
2024-08-06 17:13:48 -07:00
Nicola Corti e50e554039 Move helloworld to build from artifacts on Android (#45517)
Summary:
This moves the `helloworld` app to build from the artifacts produced by build_npm_package so that we don't rebuild ReactNative Android from source 8 times.
It reduces build time of such jobs from 14mins to 4mins, resulting in 80mins of build time for every test_all run.

## Changelog:

[INTERNAL] - Move helloworld to build from artifacts on Android

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

Test Plan: CI

Reviewed By: blakef

Differential Revision: D59957613

Pulled By: cortinico

fbshipit-source-id: b6c4adcf804af6c8d2661cf56549d037e09aa2c1
2024-07-19 08:55:19 -07:00
Nicola Corti b82d7e100c Gradle to 8.9 (#45407)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45407

This bumps to the latest minor of Gradle

Changelog:
[Android] [Changed] - Gradle to 8.9

Reviewed By: NickGerleman

Differential Revision: D59677575

fbshipit-source-id: 05b9afc6f32a9cd11461bc04522d1e522644867e
2024-07-12 09:00:39 -07:00
Blake Friedman d6e8c061cd fix: ios Helloworld assumes community cli is present (#45221)
Summary:
Use the hard-coded config for Helloworld instead of assuming the community cli is there to generate a config, which we can no longer assume.

Changelog: [Internal]

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

Test Plan:
This works in my local environment:
```
bundle exec pod install
```
and
```
./gradlew generateAutolinkingPackageList
```
Changelog: [Internal]

Reviewed By: javache

Differential Revision: D59162715

Pulled By: blakef

fbshipit-source-id: 95ff2c3929f12ee0ecf468cb80d2df1281eb746e
2024-06-28 12:05:14 -07:00
Alex Hunt ebf1a7b79b Bump packages for next major release (#45015)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45015

Set package versions to `0.76.0-main` (`0.75-stable` branch was cut).

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D58687399

fbshipit-source-id: 27ed987e4557705845d57d64e7547cddbd982a03
2024-06-26 07:59:49 -07:00
Blake Friedman 9ba600c066 chore: remove lockfile from Helloworld (#45135)
Summary:
Accidentally shipped, removing.

## Changelog: [Internal]

<!-- 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

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

Reviewed By: christophpurrer

Differential Revision: D58950410

Pulled By: blakef

fbshipit-source-id: 7bda7278f918a1e50c25f86e461e19fe7e176c5c
2024-06-24 08:08:11 -07:00
Oskar Kwaśniewski a7b2555644 feat: remove upper limit for Cocoapods version (allow for 1.15.2) (#45099)
Summary:
This PR uses a suggested solution from here: https://github.com/facebook/react-native/issues/42698 to allow users to use Cocoapods 1.15.2 which fixed issues regarding RN builds.

## Changelog:

[IOS] [FIXED] - Bump cocoapods version to 1.15.2 excluding 1.15.0, 1.15.1

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

Test Plan: CI Green

Reviewed By: blakef

Differential Revision: D58863685

Pulled By: cipolleschi

fbshipit-source-id: 0128eb0cbf83e4a3d35addbae4c31e349775688c
2024-06-21 04:12:26 -07:00
Nicola Corti 15909fab95 packages/react-native-gradle-plugin/ -> packages/gradle-plugin/ (#44832)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44832

I'm renaming this folder as now we have 2 gradle plugins + we currently have
`package/react-native-gradle-plugin/react-native-gradle-plugin/` which is confusing so we can just call this folder `packages/gradle-plugin/`
to be consistent with the NPM package name

Changelog:
[Internal] [Changed] - packages/react-native-gradle-plugin/ -> packages/gradle-plugin/

Reviewed By: blakef

Differential Revision: D58284883

fbshipit-source-id: 5a7bb40a5d80f6fbab4ffb29e44107453f1013ec
2024-06-21 01:08:00 -07:00
Tim Yung 0dd8224a71 RN/Relay: Bump Dependency to React 19 (#44990)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44990

Upgrades React Native and Relay to depend on React 19, which is currently published as release candidates. This is in preparation for React Native 0.75.

This will depend on updating open source renderers after [facebook/react#29903](https://github.com/facebook/react/pull/29903) is merged.

Changelog:
[General][Changed] - Upgrade to React 19

Reviewed By: robhogan

Differential Revision: D58625271

fbshipit-source-id: f9ad95b18716a9ce02f7cfbcc7248bdfb244c010
2024-06-17 02:59:55 -07:00
Nicola Corti 2b640bec34 Fix for broken test_helloworld_android on Release (#44952)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44952

The test_helloworld_android Release variant are broken on GHA.
This fixes it as it forces hermesc to be built *before* the app attempts to create a bundle.

Changelog:
[Internal] [Changed] - Fix for broken test_helloworld_android on Release

Reviewed By: cipolleschi, blakef

Differential Revision: D58591480

fbshipit-source-id: 2afc1cfe8c416da6f5919d20098639653798dd1a
2024-06-14 11:11:20 -07:00
Blake Friedman 7061649c03 Fixes for release builds (#44943)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44943

Release builds require more configuration.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D58529721

fbshipit-source-id: ca78ab530a459e6b9ec4595d22c1aecc66bc9dc0
2024-06-14 06:10:52 -07:00
Blake Friedman b2e6a37e5b configure to build from source (#44920)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44920

Configure helloworld to build from source, using a combination of our [How to Build from Source](https://reactnative.dev/contributing/how-to-build-from-source#update-your-project-to-build-from-source) guide, as well as using rn-tester's config as a guide.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D58287748

fbshipit-source-id: 836b09416f4da4087fbdea4476d29cd226157914
2024-06-13 04:51:20 -07:00
Blake Friedman 6970854a15 cli assemble support (#44903)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44903

Call our wrapper to assemble an Android build of helloworld.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D58287785

fbshipit-source-id: 15aa303008254780b3d1b625b392bdbe2869a19a
2024-06-13 04:51:20 -07:00
Blake Friedman 20c89f6d83 point react gradle config to monorepo (#44901)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44901

Point Gradle to the monorepo instead of a node_modules, as well as remove some commented out entries we're not interested in.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D58287786

fbshipit-source-id: 92b3d15d05c55a2589bb8a6b75dc3d5d0f9756ff
2024-06-13 04:51:20 -07:00
Nicola Corti 14ccf6bc9c Remove android.enableJetifier (#44876)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44876

We probably don't need Jetifier anymore at this point.
Also see: https://github.com/react-native-community/template/pull/9

Changelog:
[Internal] [Changed] - Remove `android.enableJetifier`

Reviewed By: rshest

Differential Revision: D58416487

fbshipit-source-id: f60c58aaf17b90c610959589fcd46026979c749a
2024-06-12 02:58:16 -07:00
Nicola Corti feeb4b773b Remove import of com.facebook.react.ReactSettingsExtension (#44850)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44850

I'm removing this line from settings.gradle:
```
import com.facebook.react.ReactSettingsExtension
```
and just using a fully qualified class name in the `configure{}` block
as imports cannot be conditionally included and is making hard for RNTA
to integrated those changes.

Changelog:
[Internal] [Changed] - Remove import of `com.facebook.react.ReactSettingsExtension`

Reviewed By: huntie

Differential Revision: D58354443

fbshipit-source-id: bc45516661318021a042e1c5921e28d7217cacbc
2024-06-10 03:26:34 -07:00
Nicola Corti 61de7da032 PackageList2 -> PackageList (#44828)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44828

I was using PackageList2 temporarily as I was migrating to Core Autolinking.
Now we can rename everything to `PackageList` to reduce the number of changes to the template for users.

Changelog:
[Internal] [Changed] - PackageList2 -> PackageList

Reviewed By: blakef

Differential Revision: D58284661

fbshipit-source-id: 8e1cc54e248519ece05336d79bb79e3f4ca706f4
2024-06-07 11:02:40 -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
Blake Friedman b5fd041917 swap test_ios_template for test_ios_helloworld in CircleCI (#44815)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44815

Remove our `test_ios_template` job for `test_ios_helloworld`.

NOTE: There needs to be a followup to do the same in our Github Actions.

Changelog: [General][Changed] use helloworld instead of template for CI tests.

Reviewed By: cipolleschi

Differential Revision: D57122797

fbshipit-source-id: 744c79230b716716fdfc234832f1eb241e091893
2024-06-06 14:41:19 -07:00
Blake Friedman 9744fa9283 cli support to bundle, build & upload (#44722)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44722

Add support for bundling, building and uploading on iOS.  I've verified these locally and will enable on CircleCI to validate.

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D57915365

fbshipit-source-id: 1e73918b31f70d337de4d3aee934c8acf88c86d0
2024-06-06 07:06:29 -07:00
Blake Friedman eba1828a83 directly call community-cli-plugin in react-native-xcode.sh (#44721)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44721

For iOS builds of `react-native`, the [react-native-xcode.sh](https://www.internalfb.com/code/fbsource/[7ad79aae3e8bf565d53f087ac7f7b7622b19acec]/xplat/js/react-native-github/packages/react-native/scripts/react-native-xcode.sh) script is executed as one of the build phases.  This phase bundles the JS application (dev or production).

I've updated this to use the new `bundle.js` script instead of calling the `react-native/cli.js`.  This is identical except with how the config is captured:

{F1669960016}

This is similar to our approach with the Gradle plugin, giving Framework authors more control.

**Other:** formatting changes for the Privacy Manifest that Xcode keeps updating.

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D57915368

fbshipit-source-id: f52ea4b3cb94212ac97a3d7edeb68747418fe0a9
2024-06-05 09:08:16 -07:00
Nicola Corti 3f3abf5b40 Kotlin to 1.9.24 (#44787)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44787

Another patch bump for our dependencies ahead of branch cut.

Changelog:
[Android] [Changed] - Kotlin to 1.9.24

Reviewed By: cipolleschi

Differential Revision: D58143548

fbshipit-source-id: 70654cb821c220ff0eed37e37ce3e68ff8e7d3a1
2024-06-04 14:51:39 -07:00
Nicola Corti f9b69cdb81 Gradle to 8.8 (#44786)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44786

Just bumping our deps before the 0.75 branch cut.

Changelog:
[Internal] [Changed] - Gradle to 8.8

Reviewed By: cipolleschi

Differential Revision: D58143547

fbshipit-source-id: 0762e36aabecda66ba637be8d02d8147d7e32d27
2024-06-04 14:51:39 -07:00
Blake Friedman ec1742a6bb build and bundle (#44720)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44720

Bug fixes to bootstrap, build and bundle on iOS.

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D57915363

fbshipit-source-id: 1c82f0020572d7d9bf599a7c568dfc6f3a3292e8
2024-06-03 06:01:43 -07:00
Blake Friedman 32b5c9601f listr → listr2 (#44716)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44716

Move to listr2 which handle non-TTY environment, outputting to CircleCI logs in a useful way.  This gives our CI users more useful debugging information, but limits the output when running locally.

If you want more explicit output locally, do something like:

```
yarn run build | cat
```

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D57915369

fbshipit-source-id: ae9f87b0b9608f16ee035b791c5f7b81544c498c
2024-05-30 07:40:36 -07:00
Blake Friedman 1aabefc5b3 build and install an iOS app (#44465)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44465

Allows us to `yarn build ios` the helloworld app.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D57067038

fbshipit-source-id: 3e2f3184a698fc5f39da9949c1ee17bd2b2ca7f5
2024-05-16 12:57:09 -07:00
Blake Friedman fedb1452a2 cli helper methods (#44463)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44463

Helper methods to help the cli grab system state, devices and run react-native/core-cli-utils tasks using Listr.

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D57067037

fbshipit-source-id: 28cb4239f3a93558b88417f366a2146f696cc411
2024-05-13 14:06:33 -07:00
Blake Friedman 01cbb173aa Allow apple to configure Hermes as option (#44461)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44461

Users would have to do this by manipulating the environment before.

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D57067036

fbshipit-source-id: 6df16c884412578c3b5cae50e26ca37636a7dc5b
2024-05-08 06:43:52 -07:00
Tim Yung abb7070a51 RN/Relay: Upgrade to React v18.3.1 (#44397)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44397

X-link: https://github.com/facebook/metro/pull/1270

Upgrades `react-native` and `relay` to the newly published `react@18.3.1`.

Changelog:
[General][Changed] - Upgrade to `react@18.3.1`

Reviewed By: jackpope

Differential Revision: D56901818

fbshipit-source-id: 423d35205bb533c6a39c0fed25a1ffea1f0bc12d
2024-05-02 16:18:26 -07:00
Blake Friedman c754755cd8 CLI supports ordering of tasks
Summary:
This gives Frameworks more control in selecting specific tasks and integrating the return types data in their UI.  For example piping `stdout` to the user or using packages like [Listr2](https://www.npmjs.com/package/listr2) to run tasks in parallel and show progress.

The ordering is suggestive (but also enforced by some assertions).  Frameworks are free to do what they want.

The order was implicit in the previous data structure with lists of Tasks, but made it difficult to tap into each async task.

I've also had to rework how we transpile the code if directly executed from the monorepo.  This keeps our:
- flow types valid,
- allows the core-cli-utils package to be built (to generate TypeScript types and a valid npm module), and
- allows direct transpiled execution as a yarn script.

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D56242487

fbshipit-source-id: a1a18f14a4aef53a98770462c8ebdef4111f0ab4
2024-04-29 05:04:26 -07:00
Blake Friedman 71c293d716 Add a custom CLI to build iOS apps (#44239)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44239

A simple CLI to build our iOS `helloworld` application.  This isn't intended for an audience other that the release team.

Some Framwork authors might be interested in it as an example of how to use our react-native/core-cli-utils to build a React Native application.

Changelog: [Internal]

I'm not going to export because it's not that interesting to folks outside / in need of scrutiny.

Reviewed By: cipolleschi

Differential Revision: D56243647

fbshipit-source-id: a5f1b6d1046bda165aa7c6848938e05f0cca2dc8
2024-04-26 08:15:04 -07:00
Blake Friedman 995d5b832d Add an internal HelloWorld template
Summary:
This is a copy of the current packages/react-native/template that we exclusively use internally for testing.

Changelog: [Internal]

NOTE: Best contribution would be to scan the file list and ensure there isn't anything that shouldn't be in there.

bypass-github-export-checks

Reviewed By: cortinico, cipolleschi

Differential Revision: D56242484

fbshipit-source-id: 0913ff7acff9b0314b49f48e986674b77dbb908e
2024-04-23 15:07:59 -07:00