-
Notifications
You must be signed in to change notification settings - Fork 24.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add bundleForVariant option (#32472)
Summary: Ref #30606 (comment) ## Changelog [Android] [Added] - Add bundleForVariant option Pull Request resolved: #32472 Test Plan: I added the following log into react.gradle and ran the Android build for my app: ``` println("bundleEnabled: ${targetName}, ${bundleForVariant(variant)}") ``` ``` # build.gradle project.ext.react = [ entryFile: "index.android.js", enableHermes: true, // clean and rebuild if changing bundleForVariant: { def variant -> variant.name.toLowerCase().contains('release') || variant.name.toLowerCase().contains('live') }, ] ... flavorDimensions 'branding' productFlavors { cve { dimension 'branding' } whce { dimension 'branding' } } ``` Console output: ``` Reading env from: env/cve/live bundleEnabled: CveDebug, false bundleEnabled: CveRelease, true bundleEnabled: CveLive, true bundleEnabled: WhceDebug, false bundleEnabled: WhceRelease, true bundleEnabled: WhceLive, true ``` Reviewed By: cortinico, ryancat Differential Revision: D31910406 Pulled By: ShikaSD fbshipit-source-id: baca5efaddedddad15d974cc7bb8f3c2a4c4f35b
- Loading branch information
1 parent
d1439e8
commit d2c10da
Showing
3 changed files
with
25 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters