Commit Graph

16 Commits

Author SHA1 Message Date
Nivaldo Bondança d1a1020a4a Codemod format for trailing commas change
Reviewed By: VladimirMakaev

Differential Revision: D80576929

fbshipit-source-id: 1310f77f5d9d489b780b14875454ebda7f7adfc9
2025-08-19 18:15:18 -07:00
Nivaldo Bondança 2ab6f22f26 Codemod format for trailing commas incoming change [5/n] (#53260)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53260

X-link: https://github.com/facebook/yoga/pull/1847

Adding trailing commas.

Reviewed By: cortinico

Differential Revision: D80174965

fbshipit-source-id: 5438fa9ebce13525b1286dd30704138ef99703cb
2025-08-14 07:24:42 -07:00
Nick Gerleman 3f9b19eb89 Fix build_android GHA Job (#52694)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52694

build_android job is always failing, with this assertion. Seems like find/replace in D78484060 gone wrong?

Changelog: [Internal]

Reviewed By: sbuggay

Differential Revision: D78534334

fbshipit-source-id: 291bdd01b41fa6efea00ed63a0dee8bdb14cbc3a
2025-07-17 20:42:02 -07:00
Riccardo Cipolleschi 2c752af535 Fix Windows CI (#52666)
Summary:
As per [this issue](https://github.com/actions/runner-images/issues/12416), Windows machine doesn't have access to D: drive anymore

## Changelog:
[Internal] -

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

Test Plan: GHA

Reviewed By: huntie

Differential Revision: D78484060

Pulled By: cipolleschi

fbshipit-source-id: 36d844f9d7d69f1d74a154b019307cc1e269ad66
2025-07-17 05:15:04 -07:00
Mateo Guzmán 42b8921d91 Kotlin: Set up ktfmt in OSS (#52064)
Summary:
This PR adds the basic `ktfmt` setup in OSS to lint Kotlin files before they're imported into the Meta codebase, making collaboration with external contributors smoother for Android related PRs.

I tried to put together certain rules that mimic the current code style and it seems to work well as I get no errors for properly formatted files but this still might need some input to have the correct configuration.

Added two scripts to the main package.json:
- To check the files format you can run: `yarn lint-kotlin-check`
- To apply formatting fixes, run: `yarn lint-kotlin`

## Changelog:

[INTERNAL] - Kotlin: Set up ktfmt in OSS

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

Test Plan:
Unformat any random Kotlin file inside ReactAndroid and then run:
```sh
yarn lint-kotlin-check
yarn lint-kotlin
```

Reviewed By: cipolleschi

Differential Revision: D78272876

Pulled By: cortinico

fbshipit-source-id: 0cf6b976968dfc5c6c478e88d17eb21c18961a34
2025-07-15 08:31:00 -07:00
meg 777397667c fix issue #51297 which addresses allWarningsAsErrors type error (#51300)
Summary:
Resolved a build error [issue https://github.com/facebook/react-native/issues/51297](https://github.com/facebook/react-native/issues/51297) caused by assigning a Boolean to a Property<Boolean>.
Switched from direct assignment to using .set(...) to correctly configure allWarningsAsErrors from project properties.

## Changelog:

- Gradle fix: assign allWarningsAsErrors using .set() for Property<Boolean>

<!-- 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] - [ANDROID] [FIXED]

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

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

Test Plan:
Fixes build failure with React Native v0.79.2 and Gradle v8.0.
```
npm run start
npm run android
```
no more build errors

Reviewed By: cortinico

Differential Revision: D74706741

Pulled By: rshest

fbshipit-source-id: 31ec923f49a6da63fb5abb464bc38b99b1e8650a
2025-05-14 02:54:02 -07:00
Nicola Corti a3d38d5722 Kotlin to 2.1.20 (#50780)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50780

This bumps Kotlin to the latest stable: 2.1.20.
I've also fixed several warnings emitted by the new compiler.

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

Reviewed By: rshest

Differential Revision: D73122000

fbshipit-source-id: 019a01d085b2c115a3efcf567056e9990a1ff0ce
2025-04-17 08:40:20 -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 6eb21ca1fb RNGP: Read enableWarningsAsErrors property correctly (#46657)
Summary:
I've noticed that some users are reporting build failures due to warnings inside RNGP.
We do have `allWarningsAsErrors` set to true for everyone (also for users).
That's too aggressive, and can cause build failures which are not necessary. Let's keep it enabled only on our CI (when the `enableWarningsAsErrors` property is set).

## Changelog:

[INTERNAL] - RNGP: Read `enableWarningsAsErrors` property correctly

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

Test Plan: CI

Reviewed By: NickGerleman

Differential Revision: D63459601

Pulled By: cortinico

fbshipit-source-id: 0307e8d6771518038a5abe27ca5a993cb0a9f8c0
2024-09-27 08:40:14 -07:00
Nicola Corti d7884a6bb8 RNGP - Sanitize the output of the config command (#46482)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46482

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

I'm sanitizing the output of the `config` command + I've added some more logging in case of failure.

Changelog:
[Android] [Fixed] - RNGP - Sanitize the output of the config command

Reviewed By: cipolleschi

Differential Revision: D62641979

fbshipit-source-id: c13d27a42beeb7a973c1802e7204631d49d3d09b
2024-09-13 10:42:20 -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
Miguel Daipré e7881c2f45 feat: migrate JsonUtilsTest, OsTest and TaskUtilsTest to AssertJ (#45608)
Summary:
Issue: https://github.com/facebook/react-native/issues/45596

Note:

The formatting changes have been altered by Android Studio. `Code -> Format Code`

## Changelog:

[INTERNAL] [CHANGED] - Migrated `JsonUtilsTest`, `OsTest`, `TaskUtilsTest` from junit.Assert to assertj.core.api.Assertions.

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

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

Reviewed By: mdvacca

Differential Revision: D60137234

Pulled By: cortinico

fbshipit-source-id: 236dc46dd04ad1f62a5e11fd77cf2c63bec99cff
2024-07-23 16:56:59 -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 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