You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add hermesFlagsForVariant and deleteDebugFilesForVariant (#32281)
Summary:
Ref #25601 (comment).
From #31040.
The `hermesFlagsRelease` option only works with the release build type, but not with other build types.
This PR allows hermes flags on a per variant basis to be specified using the `hermesFlagsForVariant` lambda.
It also allows the hermes debugger cleanup to be run on a per variant basis using the `deleteDebugFilesForVariant` lambda.
## Changelog
<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://github.com/facebook/react-native/wiki/Changelog
-->
[Android] [Fixed] - Fix hermesFlags not working with multiple variants
Pull Request resolved: #32281
Test Plan:
Set the following options in `android/app/build.gradle` and ensure warnings are hidden when running `./gradlew assembleRelease` and `./gradlew assembleLive`.
```
hermesFlagsForVariant: {
def v -> v.name.toLowerCase().contains('release') || v.name.toLowerCase().contains('live') ? ['-w'] : []
},
deleteDebugFilesForVariant: {
def v -> v.name.toLowerCase().contains('release') || v.name.toLowerCase().contains('live')
},
```
Reviewed By: cortinico
Differential Revision: D31234241
Pulled By: ShikaSD
fbshipit-source-id: 2cb3dd63adbcd023061076b5a3b262a87b470518
0 commit comments