Commit Graph

30 Commits

Author SHA1 Message Date
Nicola Corti 5e6478954c Gradle to 8.12 (#48539)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48539

This keeps our Gradle version up to date ahead of the branch cut for 0.78.
https://docs.gradle.org/current/release-notes.html

Changelog:
[Android] [Changed] - Bump Gradle to 8.12

Reviewed By: NickGerleman

Differential Revision: D67946619

fbshipit-source-id: 0b5ea8d9543ca565ea8b3bdd48e5fc711f832ce8
2025-01-09 03:10:02 -08:00
Kudo Chien e42a3a6b84 Migrate jsc-android to mavenCentral (#47972)
Summary:
Since people mostly use Hermes, it doesn't make sense to download jsc-android from npm even when jsc is not used. This PR migrates the jsc-android to [mavenCentral](https://repo1.maven.org/maven2/io/github/react-native-community/jsc-android/2026004.0.0/). The new jsc-android supports Android 16KB memory page sizes and packaged by prefab.
Relevant PRs:
  - https://github.com/react-native-community/jsc-android-buildscripts/pull/184
  - https://github.com/react-native-community/jsc-android-buildscripts/pull/185

## Changelog:

[ANDROID] [CHANGED] - Migrate jsc-android to mavenCentral

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

Test Plan: CI passed

Reviewed By: cipolleschi

Differential Revision: D66772407

Pulled By: cortinico

fbshipit-source-id: e34d2d138996e394763ef67d7aad65bb3e7b13dc
2024-12-06 12:50:34 -08:00
Nicola Corti 490db92562 Gradle to 8.11.1 (#48026)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48026

This should mitigate this particular issue we're seeing on Windows:
- https://github.com/facebook/react-native/issues/46210

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

Reviewed By: javache

Differential Revision: D66600321

fbshipit-source-id: d58437485222e189d90bcf4d6b41ca956449ed22
2024-12-02 03:22:32 -08:00
Alan Lee 48ea6867a9 update targetSdk to 35 (#47738)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47738

- updating targetSdk to 35 for RN Android and helloworld
- **Note:** `tagetSdk` of RN Android does not have effect on the app's targetSdk. App can set `targetSdk` regardless of what RN targetSdk is. Updating the targetSdk just signals that RN Android has been tested with targetSdk 35 and apps can choose to support lower targetSdk as needed.

Changelog:
[Android][Changed] updating targetSdk to 35 (apps can still choose their own targetSdk regardless of RN version)

Reviewed By: NickGerleman

Differential Revision: D66209381

fbshipit-source-id: 2f26e8f605a383ff662e4b1d65611f186a7d7979
2024-11-20 11:06:31 -08:00
Alan Lee ba061a5d18 Bump NDK to 27.1 (#46357)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46357

Bumping NDK to 27.1.12297006 as we need it to build native libraries with 16KB page size support.

See:
- Changelog r27: https://github.com/android/ndk/wiki/Changelog-r27
- 16KB page sizes: https://developer.android.com/guide/practices/page-sizes

Changelog:
[Android] [Changed] - Android NDK to 27.1

Reviewed By: cortinico

Differential Revision: D62278654

fbshipit-source-id: 9968a45d9f41031571dfa1bb1671d6ad71d0644d
2024-10-24 10:58:09 -07:00
Nicola Corti 972c2c864c Bump Kotlin 1.9.x to 2.0.x (#46955)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46955

This is a major bump of Kotlin. It comes with no breaking changes for the Kotlin API, but there are several new warnigns that I had to fix.
Most importantly several `override` methods that are overriding Deprecated API, also need to be deprecated as well in Kotlin.

Changelog:
[Android] [Changed] - Bump Kotlin 1.9.x to 2.0.x

Reviewed By: tdn120

Differential Revision: D64179842

fbshipit-source-id: 295ab2636ce9f9bb04e9d8c7ed27d9f8a1a64338
2024-10-11 05:34:02 -07:00
Nicola Corti ecd660984c Gradle to 8.10.2 (#46656)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46656

This contains the fix for:
- https://github.com/gradle/gradle/issues/30472

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

Reviewed By: tdn120

Differential Revision: D63457979

fbshipit-source-id: 1439a9ce198c1df0dafa8f5088c079c3fb3d1543
2024-09-27 00:43:25 -07:00
Nicola Corti 2136c19944 Bump SoLoader to 0.12.1 and remove unnecessary extra manifest metadata. (#46461)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46461

This bumps SoLoader to 0.12.1 inside React Native and cleans up the extra
`com.facebook.soloader.enabled` metadata which are not necessary anymore.

Changelog:
[Internal] [Changed] - Bump SoLoader to 0.12.1 and remove unnecessary extra manifest metadata

Reviewed By: cipolleschi

Differential Revision: D62581188

fbshipit-source-id: ff990c0af1f0f51070037fcb4c7c13fbe6bae234
2024-09-13 03:51:58 -07:00
Nicola Corti d7c1e5b989 Unblock RNTester instacrashing due to SoLoader not being enabled (#46459)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46459

After the SoLoader 0.12.0 bump I've noticed RNTester is instacrashing due to us not having enabled it
explicitely in the Manifest:

Changelog:
[Internal] [Changed] - Unblock RNTester instacrashing due to SoLoader not being enabled

Reviewed By: cipolleschi

Differential Revision: D62580751

fbshipit-source-id: 3b291e7f82daf1a6bd61bc9588c2d49a389801ef
2024-09-12 14:16:33 -07:00
Nicola Corti 81e8c39f0a Do not stub SoLoader and use version 0.12.0 (#46422)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46422

Stubbing SoLoader comes with a couple of breaking changes (e.g. users in OSS are using `com.facebook.common.logging.FLog` which is exposed by Fresco).

In order to reduce those breaking changes, here I'm moving React Native to use SoLoader 0.12.0.
This new version comes with a constructor that accepts a MergedSoMapping implementation which we provide only for OSS apps.

Please note that the CI on this Diff will be red till SoLoader 0.12.0 releases.

Changelog:
[Internal] [Changed] - Do not stub SoLoader and use version 0.12.0

Reviewed By: cipolleschi

Differential Revision: D62447566

fbshipit-source-id: 6ff38799ed0c9f40cf3ab84be8a05979def63dc2
2024-09-12 07:17:22 -07:00
Nicola Corti 90f89a830a Gradle to 8.10.1 (#46399)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46399

This is a patch release for Gradle. Let's include it inside main/0.76.

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

Reviewed By: tdn120

Differential Revision: D62377887

fbshipit-source-id: e8a5acaa48c15c9a12a09504c33c2a0d2834d92c
2024-09-09 07:26:53 -07:00
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
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
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
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
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 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
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 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 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