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
This commit is contained in:
Nicola Corti 2024-06-21 01:08:00 -07:00 committed by Facebook GitHub Bot
parent 3429dc1ccf
commit 15909fab95
91 changed files with 30 additions and 21 deletions

View File

@ -151,8 +151,10 @@ jobs:
- packages/react-native/ReactAndroid/hermes-engine/.cxx/
- packages/react-native/ReactAndroid/hermes-engine/build/
- packages/react-native/ReactAndroid/src/main/jni/prebuilt/
- packages/react-native-gradle-plugin/.gradle/
- packages/react-native-gradle-plugin/build/
- packages/gradle-plugin/.gradle/
- packages/gradle-plugin/react-native-gradle-plugin/build/
- packages/gradle-plugin/settings-plugin/build/
- packages/gradle-plugin/shared/build/
- packages/react-native-codegen/lib/
# -------------------------
@ -181,8 +183,9 @@ jobs:
platform: android
- store_test_results:
path: ~/react-native/packages/react-native-gradle-plugin/build/test-results
path: ~/react-native/packages/gradle-plugin/react-native-gradle-plugin/build/test-results
- store_test_results:
path: ~/react-native/packages/gradle-plugin/settings-plugin/build/test-results
- store_test_results:
path: ~/react-native/packages/react-native/ReactAndroid/build/test-results

View File

@ -493,8 +493,8 @@ jobs:
name: build-android-results
compression-level: 1
path: |
packages/react-native-gradle-plugin/react-native-gradle-plugin/build/reports
packages/react-native-gradle-plugin/settings-plugin/build/reports
packages/gradle-plugin/settings-plugin/build/reports
packages/gradle-plugin/react-native-gradle-plugin/build/reports
packages/react-native/ReactAndroid/build/reports
- name: Upload RNTester APK
if: ${{ always() }}
@ -503,6 +503,7 @@ jobs:
name: rntester-apk
path: packages/rn-tester/android/app/build/outputs/apk/
compression-level: 0
build_npm_package:
runs-on: 8-core-ubuntu
needs: [set_release_type, prepare_hermes_workspace, build_hermes_macos, build_hermesc_linux, build_hermesc_windows,build_android]

View File

@ -492,8 +492,8 @@ jobs:
name: build-android-results
compression-level: 1
path: |
packages/react-native-gradle-plugin/react-native-gradle-plugin/build/reports
packages/react-native-gradle-plugin/settings-plugin/build/reports
packages/gradle-plugin/react-native-gradle-plugin/build/reports
packages/gradle-plugin/settings-plugin/build/reports
packages/react-native/ReactAndroid/build/reports
- name: Upload RNTester APK
if: ${{ always() }}

View File

@ -565,8 +565,8 @@ jobs:
name: build-android-results
compression-level: 1
path: |
packages/react-native-gradle-plugin/react-native-gradle-plugin/build/reports
packages/react-native-gradle-plugin/settings-plugin/build/reports
packages/gradle-plugin/react-native-gradle-plugin/build/reports
packages/gradle-plugin/settings-plugin/build/reports
packages/react-native/ReactAndroid/build/reports
- name: Upload RNTester APK
if: ${{ always() }}

View File

@ -60,7 +60,7 @@ nexusPublishing {
tasks.register("clean", Delete::class.java) {
description = "Remove all the build files and intermediate build outputs"
dependsOn(gradle.includedBuild("react-native-gradle-plugin").task(":clean"))
dependsOn(gradle.includedBuild("gradle-plugin").task(":clean"))
subprojects.forEach {
if (it.project.plugins.hasPlugin("com.android.library") ||
it.project.plugins.hasPlugin("com.android.application")) {
@ -86,7 +86,7 @@ tasks.register("clean", Delete::class.java) {
tasks.register("build") {
description = "Build and test all the React Native relevant projects."
dependsOn(gradle.includedBuild("react-native-gradle-plugin").task(":build"))
dependsOn(gradle.includedBuild("gradle-plugin").task(":build"))
}
tasks.register("publishAllToMavenTempLocal") {

View File

@ -1,4 +1,4 @@
build/
app-plugin/build/
react-native-gradle-plugin/build/
settings-plugin/build/
shared/build/

View File

@ -20,4 +20,4 @@ yarn add @react-native/gradle-plugin
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`.
2. `./gradlew -p packages/gradle-plugin test`.

View File

@ -1,3 +1,8 @@
@REM Copyright (c) Meta Platforms, Inc. and affiliates.
@REM
@REM This source code is licensed under the MIT license found in the
@REM LICENSE file in the root directory of this source tree.
@rem
@rem Copyright 2015 the original author or authors.
@rem

View File

@ -6,9 +6,9 @@
"repository": {
"type": "git",
"url": "git+https://github.com/facebook/react-native.git",
"directory": "packages/react-native-gradle-plugin"
"directory": "packages/gradle-plugin"
},
"homepage": "https://github.com/facebook/react-native/tree/HEAD/packages/react-native-gradle-plugin#readme",
"homepage": "https://github.com/facebook/react-native/tree/HEAD/packages/gradle-plugin#readme",
"keywords": [
"gradle",
"plugin",

View File

@ -21,4 +21,4 @@ include(
":shared",
)
rootProject.name = "gradle-plugins-root"
rootProject.name = "gradle-plugin-root"

View File

@ -6,13 +6,13 @@
*/
// Autolinking has now moved into the React Native Gradle Plugin
pluginManagement { includeBuild("../../react-native-gradle-plugin") }
pluginManagement { includeBuild("../../gradle-plugin") }
plugins { id("com.facebook.react.settings") }
extensions.configure(com.facebook.react.ReactSettingsExtension){ ex -> ex.autolinkLibrariesFromCommand() }
rootProject.name = 'HelloWorld'
include ':app'
includeBuild('../../react-native-gradle-plugin')
includeBuild('../../gradle-plugin')
includeBuild('../../react-native') {
dependencySubstitution {
substitute(module("com.facebook.react:react-android")).using(project(":packages:react-native:ReactAndroid"))

View File

@ -11,7 +11,7 @@ pluginManagement {
google()
gradlePluginPortal()
}
includeBuild("packages/react-native-gradle-plugin/")
includeBuild("packages/gradle-plugin/")
}
include(
@ -20,7 +20,7 @@ include(
":packages:react-native:ReactAndroid:external-artifacts",
":packages:rn-tester:android:app")
includeBuild("packages/react-native-gradle-plugin/")
includeBuild("packages/gradle-plugin/")
dependencyResolutionManagement {
versionCatalogs {