Skip to content

Cleanup and scope all the Gradle Properties#38885

Closed
cortinico wants to merge 1 commit into
facebook:mainfrom
cortinico:export-D48188310
Closed

Cleanup and scope all the Gradle Properties#38885
cortinico wants to merge 1 commit into
facebook:mainfrom
cortinico:export-D48188310

Conversation

@cortinico
Copy link
Copy Markdown
Contributor

Summary:
We do have several Gradle Properties that are used to configure the build.

I've refactored them all and moved them inside the PropertyUtils file:
https://github.com/facebook/react-native/blob/main/packages/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/utils/PropertyUtils.kt

Specifically properties should be 'scoped' under react. if public, and react.internal. if for internal usage.

Property that I cleaned up are:

  • REACT_NATIVE_MAVEN_LOCAL_REPO becomes react.internal.mavenLocalRepo
  • REACT_WINDOWS_BASH becomes react.internal.windowsBashPath
  • GROUP becomes react.internal.publishingGroup

I've also added support for scoping for public properties with backward compat (so both the scoped and unscoped properties are accepted):

  • react.newArchEnabled
  • react.hermesEnabled
  • react.nativeArchitectures

Changelog:
[Android] [Changed] - Cleanup and scope all the Gradle Properties

Differential Revision: D48188310

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Facebook Partner: Facebook Partner fb-exported labels Aug 9, 2023
@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D48188310

@analysis-bot
Copy link
Copy Markdown

analysis-bot commented Aug 9, 2023

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 8,947,566 +43
android hermes armeabi-v7a n/a --
android hermes x86 n/a --
android hermes x86_64 n/a --
android jsc arm64-v8a 9,541,278 -11
android jsc armeabi-v7a n/a --
android jsc x86 n/a --
android jsc x86_64 n/a --

Base commit: 0279a70
Branch: main

@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D48188310

@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D48188310

1 similar comment
@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D48188310

Summary:
Pull Request resolved: facebook#38885

We do have several Gradle Properties that are used to configure the build.

I've refactored them all and moved them inside the PropertyUtils file:
https://github.com/facebook/react-native/blob/main/packages/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/utils/PropertyUtils.kt

Specifically properties should be 'scoped' under `react.` if public, and `react.internal.` if for internal usage.

Property that I cleaned up are:
- REACT_NATIVE_MAVEN_LOCAL_REPO becomes react.internal.mavenLocalRepo
- REACT_WINDOWS_BASH becomes react.internal.windowsBashPath
- GROUP becomes react.internal.publishingGroup

I've also added support for scoping for public properties with backward compat (so both the scoped and unscoped properties are accepted):
- react.newArchEnabled
- react.hermesEnabled
- react.nativeArchitectures

Changelog:
[Android] [Changed] - Cleanup and scope all the Gradle Properties

Reviewed By: mdvacca

Differential Revision: D48188310

fbshipit-source-id: 2d791d4d2c2e48957e62c0ce4bbc0a12d4379465
@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D48188310

@github-actions
Copy link
Copy Markdown

This pull request was successfully merged by @cortinico in 1a765b6.

When will my fix make it into a release? | Upcoming Releases

@github-actions github-actions Bot added the Merged This PR has been merged. label Aug 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported Merged This PR has been merged. p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants