Commit Graph

22 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
Nicola Corti 55d35411ae Finalize AssertJ migration (#46097)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46097

I've noticed we still have some tests here and there that were not migrated to AssertJ. This finishes them all.

Changelog:
[Internal] [Changed] - Finalize AssertJ migration

Reviewed By: javache

Differential Revision: D61473682

fbshipit-source-id: 3d51bfeb0e5ba3fd8cd4f3667dc88de3d88a3dbc
2024-08-19 10:51:24 -07:00
Nicola Corti db80d78d7a Merge all the remaining .so libraries into libreactnative.so (#46059)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46059

This merges all the remaining dynamic libraries into libreactnative.so.
Sadly I couldn't split this in smaller diffs as all the libraries are connected with each other.

I also had to introduce 2 other SOs: `libhermestooling.so` and `libjsctooling.so` which contains
all the necessary libs used when loading either JSC or Hermes. They need to be isolated
as RNGP will remove those libraries based on the library the user decides to pick.

Changelog:
[Android] [Breaking] - Merge all the remaining .so libraries into libreactnative.so

Reviewed By: hezi

Differential Revision: D61376496

fbshipit-source-id: ab9e725b7acbebdfd8fa3ff36ad34d080044bf0e
2024-08-16 05:42:46 -07:00
Antony M. Kithinzi 491c3e9d76 chore: migrate GenerateCodegenArtifactsTaskTest to assertj (#45845)
Summary:
Issue: https://github.com/facebook/react-native/issues/45596

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

[INTERNAL] [CHANGED] - Migrated `packages/gradle-plugin/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/tasks/GenerateCodegenArtifactsTaskTest.kt` to assertj.

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

Test Plan: Run `./gradlew -p packages/gradle-plugin test`

Reviewed By: hezi

Differential Revision: D60597025

Pulled By: cortinico

fbshipit-source-id: 4228b958c7b9e1506640b9ff217f098e2626ea81
2024-08-02 04:08:08 -07:00
omer-ayhan 84de32b2d7 chore: ☂️ Migrate BundleHermesCTaskTest.kt to AssertJ (#45806)
Summary:
Issue: https://github.com/facebook/react-native/issues/45596

## Changelog:
[INTERNAL] [CHANGED] - Migrate `BundleHermesCTaskTest.kt` to AssertJ testing library

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

Test Plan: Run `./gradlew -p packages/gradle-plugin test`

Reviewed By: mdvacca

Differential Revision: D60522760

Pulled By: cortinico

fbshipit-source-id: f7847143d182b29e1bbbba738a0ddae9bf3ee59c
2024-07-31 11:08:30 -07:00
Bogusz Kaszowski 2b39e6307e chore: migrate PrepareJSCTaskTest to assertj (#45842)
Summary:
Issue: https://github.com/facebook/react-native/issues/45596

## Changelog:

[ANDROID] [CHANGED] - Migrated `packages/gradle-plugin/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/tasks/internal/PrepareJSCTaskTest.kt` to assertj.

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

Test Plan: Run `./gradlew -p packages/gradle-plugin test`

Reviewed By: mdvacca, arushikesarwani94

Differential Revision: D60519806

Pulled By: cortinico

fbshipit-source-id: 04e6a35ecafcb08e6935599d863ab62180383ac4
2024-07-31 11:01:18 -07:00
omer-ayhan 575ab78625 chore: ☂️ Migrate GenerateCodegenSchemaTaskTest.kt to AssertJ (#45807)
Summary:
Issue: https://github.com/facebook/react-native/issues/45596

## Changelog:
[INTERNAL] [CHANGED] - Migrate `GenerateCodegenSchemaTaskTest.kt` to AssertJ testing library

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

Test Plan: Run `./gradlew -p packages/gradle-plugin test`

Reviewed By: andrewdacenko

Differential Revision: D60509334

Pulled By: cortinico

fbshipit-source-id: 0702958f0c9d03994b0c9a6a1c743f5db84e5703
2024-07-31 04:53:18 -07:00
omer-ayhan 9cd3c57840 chore: ☂️ Migrate PreparePrefabHeadersTaskTest.kt to AssertJ (#45808)
Summary:
Issue: https://github.com/facebook/react-native/issues/45596

## Changelog:
[INTERNAL] [CHANGED] - Migrate `PreparePrefabHeadersTaskTest.kt` to AssertJ testing library

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

Test Plan: Run `./gradlew -p packages/gradle-plugin test`

Reviewed By: andrewdacenko

Differential Revision: D60509282

Pulled By: cortinico

fbshipit-source-id: 1b7d9f0c24bb0e8e573f685582c532a38e6b3b13
2024-07-31 04:45:02 -07:00
omerayhan-shft 6aac1de6bb chore: ☂️ Migrate GeneratePackageListTaskTest.kt to AssertJ (#45790)
Summary:
Issue: https://github.com/facebook/react-native/issues/45596

## Changelog:
[INTERNAL] [CHANGED] - Migrate `GeneratePackageListTaskTest.kt` to AssertJ testing library

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

Test Plan: Run `./gradlew -p packages/gradle-plugin test`

Reviewed By: sammy-SC

Differential Revision: D60382287

Pulled By: cortinico

fbshipit-source-id: 338c771db9d407f0d83e1c62a8c13ac26d898926
2024-07-29 08:06:28 -07:00
Gabriel Donadel af2cdcb752 RNGP - Filter out null dependencies from getGradleDependenciesToApply (#45749)
Summary:
`getGradleDependenciesToApply` tries to call `implementation:` in all libraries, including the ones that are not supported on Android.

## Changelog:

[INTERNAL] [FIXED] - Filter out platform-specific libraries from the auto-linking gradle plugin

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

Test Plan: CI should be green

Reviewed By: cipolleschi

Differential Revision: D60374769

Pulled By: cortinico

fbshipit-source-id: 33c83e9cc39d81b0e5c497570a936831ebb345f9
2024-07-29 04:08:15 -07:00
Jakub Urban 9bddcdef85 chore: migrate assertions in all unit tests in PrepareBoostTaskTest from jUnit to AssertJ. (#45718)
Summary:
https://github.com/facebook/react-native/issues/45596

Migrated all the assertions to use `assertThat()` function from AssertJ.
Also updated the `prepareBoostTask_withMissingConfiguration_fails` test to use `assertThatThrownBy` to check if the tested task throws a given exception.

## Changelog:
Migrate tests to assertj in these files:

- `packages/gradle-plugin/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/tasks/internal/PrepareBoostTaskTest.kt`

[INTERNAL] [CHANGED] - Migrated PrepareBoostTaskTest from junit.Assert to assertj.core.api.Assertions.

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

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

Test Plan:
All tests pass when `./gradlew -p packages/gradle-plugin test` command is ran.

<img width="454" alt="image" src="https://github.com/user-attachments/assets/9e954f7b-2208-48a9-ae15-ab642252e6da">

Reviewed By: GijsWeterings

Differential Revision: D60284566

Pulled By: cortinico

fbshipit-source-id: 11af0a0ca574f935e6aab3a7855b5daaeab1a718
2024-07-26 05:45:26 -07:00
Henrique Cicero f4435115cc chore: Migrate FileUtilsTest.kt, NdkConfiguratorUtilsTest.kt and AgpConfiguratorUtilsTest.kt to AssertJ (#45665)
Summary:
Issue: [https://github.com/facebook/react-native/issues/45596](https://github.com/facebook/react-native/issues/45596)

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

[INTERNAL] [CHANGED] - Migrated to AssertJ within files FileUtilsTest.kt, NdkConfiguratorUtilsTest.kt and AgpConfiguratorUtilsTest.kt

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

Test Plan: Run `./gradlew -p packages/gradle-plugin test`

Reviewed By: GijsWeterings

Differential Revision: D60276163

Pulled By: cortinico

fbshipit-source-id: c730acafc37606f1db8d53a61fc9443d88bccdfc
2024-07-26 05:21:33 -07:00
Miguel Daipré 053865bd80 feat: migrate BuildCodegenCLITaskTest and PrepareGlogTaskTest to AssertJ (#45649)
Summary:
Issue: https://github.com/facebook/react-native/issues/45596

## Changelog:

[ANDROID] [CHANGED] - Migrated `BuildCodegenCLITaskTest`, `PrepareGlogTaskTest` from junit.Assert to assertj.core.api.Assertions.

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

Test Plan: Run `./gradlew -p packages/gradle-plugin test`

Reviewed By: christophpurrer

Differential Revision: D60178114

Pulled By: cortinico

fbshipit-source-id: f0cfe9da945829a2bada8e9807eb1877240d93d6
2024-07-25 01:33:28 -07:00
Oskar Kaczmarzyk 4cc46e3ca6 chore: tests migration to assertj (KotlinStdlibCompatUtilsTest, ModelAutolinkingDependenciesJsonTest, PathUtilsTest, DependencyUtilsTest, ProjectUtilsTest) (#45606)
Summary:
https://github.com/facebook/react-native/issues/45596

## Changelog:

Migrated to AssertJ within files:
- `KotlinStdlibCompatUtilsTest.kt`,
- `ModelAutolinkingDependenciesJsonTest.kt`,
- `PathUtilsTest.kt`,
- `DependencyUtilsTest.kt`,
- `ProjectUtilsTest.kt`.

[INTERNAL] [CHANGED] - Migrated `KotlinStdlibCompatUtilsTest`, `ModelAutolinkingDependenciesJsonTest`, `PathUtilsTest`, `DependencyUtilsTest`, `ProjectUtilsTest` from `junit.Assert` to `assertj.core.api.Assertions`.

## Test Plan

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

Reviewed By: javache

Differential Revision: D60166231

Pulled By: cortinico

fbshipit-source-id: 5092e7d0d4c8d0a8737183962bda62ed1f54ccda
2024-07-24 09:44:45 -07:00
gustavoabel 7829de6221 chore: ☂️ migrate BackwardCompatUtilsTest to AssertJ (#45607)
Summary:
Issue: https://github.com/facebook/react-native/issues/45596

## Changelog:

Migrated to AssertJ within file:
- ```BackwardCompatUtilsTest.kt```

Changelog:
[Internal] [Changed] -  chore: ☂️ migrate BackwardCompatUtilsTest to AssertJ

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

Test Plan: Run ```./gradlew -p packages/gradle-plugin test```

Reviewed By: mdvacca

Differential Revision: D60137770

Pulled By: cortinico

fbshipit-source-id: 883b2abee430ce45018808fa934a7949ae23fcaf
2024-07-24 00:08:49 -07:00
Nicola Corti bd4aec869b RNGP - Do not attempt to load JSC from other repositories (#45598)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45598

I've noticed we attempt to load JSC from the Sonatype Snapshot repository.
That is inefficient as we already know that JSC is available only inside node modules.
This change makes the repository resolution stricter by better specifying which
repo can download which dependency.

Changelog:
[Internal] [Changed] - Do not attempt to load JSC from other repositories

Reviewed By: cipolleschi

Differential Revision: D60116002

fbshipit-source-id: 21a2213708f5b0103860a59f3342f1bc0f59cdb9
2024-07-23 08:12:42 -07:00
Nicola Corti 91ecd7eb53 RNGP - Migrate settings-plugin to AssertJ (#45575)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45575

We should move over to use AssertJ as per our linter.
I'm adding it here to a first test and will use it as a reference for some OSS contributions from outside.

Changelog:
[Internal] [Changed] - Migrate settings-plugin to Assertj

Reviewed By: cipolleschi

Differential Revision: D60037797

fbshipit-source-id: 579ed7bf5fb219e25577af3ab87934503ee7898e
2024-07-23 04:41:54 -07:00
Nicola Corti fedbe2d486 Fix core autolinking not working on Windows (#45572)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45572

0.75-rc.5 is currently broken on Windows.

This is due to us invoking `npx react-native-community/cli config` without
a `cmd /c` prefix.

This fixes it by using our function `windowsAwareCommandLine`.
The problem is that this required a lot of refactoring since that util was not available for the settings plugin.

Fixes #45403

Changelog:
[Internal] [Changed] - Fix core autolinking not working on Windows

Reviewed By: cipolleschi

Differential Revision: D60037587

fbshipit-source-id: eefeda7aafc43b9ce08f0f9225b0847fad2f46b7
2024-07-23 04:41:54 -07:00
Nicola Corti fcd526d6cc Improve tests for GenerateAutolinkingNewArchitecturesFileTask (#45510)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45510

This is just a quality of life improvement, where we test the C++ autolinking
code generation a bit more.

Changelog:
[Internal] [Changed] - Improve tests for GenerateAutolinkingNewArchitecturesFileTask

Reviewed By: blakef

Differential Revision: D59907847

fbshipit-source-id: e6367cc3b1c01700310437b73bc984e3666b3499
2024-07-18 04:15:44 -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
Nicola Corti ca17d87ed1 Upstream CLI autolinking changes to RNGP (#45314)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45314

Fixes https://github.com/facebook/react-native/issues/45302

I'm ustreaming two changes that happened inside the CLI/Autolinking logic that are
missing inside core autolinking.

Changelog:
[Internal] [Changed] - Upstream CLI autolinking changes to RNGP

Reviewed By: blakef

Differential Revision: D59460504

fbshipit-source-id: a6e7ab6a46fec26620dc965e77b13fdeba84fae3
2024-07-08 09:38:29 -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