-
Notifications
You must be signed in to change notification settings - Fork 24.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix devDisabledInStaging not working with multiple productFlavors #30606
Conversation
Base commit: def7dd8 |
551d986
to
77a9299
Compare
Base commit: def7dd8 |
73ef9d9
to
ceaa66c
Compare
ceaa66c
to
1eb3423
Compare
PR build artifact for 75a2913 is ready. |
@ShikaSD has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
@grit96, thanks for submitting this! |
|
PR build artifact for f38b56b is ready. |
@ShikaSD I noticed that the other config option that follows the |
Sure, feel free to! :) |
@ShikaSD has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
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
Fixes #27052
Summary
Since react-native 0.62, the
devDisabledIn${buildType}
syntax has stopped working for apps with multipleproductFlavors
. This PR adds thedisableDevForVariant
lambda to allow dev mode to be disabled for different variants.Changelog
[Android] [Fixed] - Fix devDisabledIn not working with multiple productFlavors
Test Plan
I added the following log into
react.gradle
and ran the Android build for my app:Console output: