Files
react-native/packages/react-native-gradle-plugin
Janic Duplessis e21c25eb91 Add missing toolchains plugin in react-native-gradle-plugin (#38292)
Summary:
I was getting the following error when trying to run RN Tester on Android.

```
A problem occurred configuring project ':packages:react-native:ReactAndroid'.
> Could not determine the dependencies of task ':react-native-gradle-plugin:compileKotlin'.
   > No matching toolchains found for requested specification: {languageVersion=17, vendor=any, implementation=vendor-specific} for MAC_OS on aarch64.
      > No locally installed toolchains match and toolchain download repositories have not been configured.
```

This is fixed by adding the `org.gradle.toolchains.foojay-resolver-convention` plugin in settings.gradle, this was done already for the root one, but not in the one in `react-native-gradle-plugin`.

## Changelog:

[INTERNAL] [FIXED] - Add missing toolchains plugin in react-native-gradle-plugin

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

Test Plan: Build RN Tester on android

Reviewed By: mdvacca

Differential Revision: D47371772

Pulled By: cortinico

fbshipit-source-id: 8eaa5de9559720a7b37d11b3ddceb5fb84753a40
2023-07-17 05:09:56 -07:00
..
2023-07-10 15:16:10 -07:00
2023-06-20 08:00:05 -07:00
2023-07-10 15:16:10 -07:00
2023-04-21 04:52:54 -07:00

@react-native/gradle-plugin

Version

A Gradle Plugin used to support development of React Native applications for Android.

Installation

yarn add @react-native/gradle-plugin

Note: We're using yarn to install deps. Feel free to change commands to use npm 3+ and npx if you like

Testing

To run the tests in this package, run the following commands from the React Native root folder:

  1. yarn to install the dependencies. You just need to run this once
  2. yarn jest packages/react-native-gradle-plugin.