-
Notifications
You must be signed in to change notification settings - Fork 24.2k
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 incorrect merged asset path with flavor for Android Gradle Plugin 3.2. #21782
Fix incorrect merged asset path with flavor for Android Gradle Plugin 3.2. #21782
Conversation
When use product flavor such as develop/production in android with Android Gradle Plugin 3.2, javascript bundle is not copied due to incorrect merged asset path. related facebook#21408
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need the corporate CLA signed. If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks! |
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
@dulmandakh what do you think? |
@kelset I'll test it tomorrow, and see if it works 👍 |
@dulmandakh Any progress on this? |
I'm building for multiple flavors and #21408 was an insufficient fix for me (runtime crash with Would love to see this land in master and a patch release soon. |
As @nokite and @mikemorris say this is a working solution, it should be okay to merge this. Could you please land this @kelset? |
Thanks for the feedback - I'll double check this soon and we'll try to import it. cc @hramos |
Hi @kelset @dulmandakh @hramos Could you take a look and let's import this (and cherry-pick into 0.57-branch). |
) Summary: Android Gradle Plugin 3.2 uses a new intermediates/merged_assets directory instead of intermediates/assets. This workaround copies the javascript bundle to both directories for compatibility purposes. Fixes #21132 Fixes #18357 Pull Request resolved: #21409 Differential Revision: D10141860 Pulled By: hramos fbshipit-source-id: 0fb20fcec67ec2bfd7a8d9052599bbc70464b466
@facebook-github-bot shipit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dulmandakh is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
… 3.2. (#21782) Summary: When we use product flavor (e.g. develop/production) with Android Gradle Plugin 3.2, javascript bundle is not copied due to that merged asset path point to incorrect location. related #21408 <!-- Thank you for sending the PR! We appreciate you spending the time to work on these changes. Help us understand your motivation by explaining why you decided to make this change. If this PR fixes an issue, type "Fixes #issueNumber" to automatically close the issue when the PR is merged. _Pull requests that expand test coverage are more likely to get reviewed. Add a test case whenever possible!_ --> Pull Request resolved: #21782 Differential Revision: D12854056 Pulled By: hramos fbshipit-source-id: d1e6a395e762cc4a4f133977d54d0f469fa66b8c
… 3.2. (facebook#21782) Summary: When we use product flavor (e.g. develop/production) with Android Gradle Plugin 3.2, javascript bundle is not copied due to that merged asset path point to incorrect location. related facebook#21408 <!-- Thank you for sending the PR! We appreciate you spending the time to work on these changes. Help us understand your motivation by explaining why you decided to make this change. If this PR fixes an issue, type "Fixes #issueNumber" to automatically close the issue when the PR is merged. _Pull requests that expand test coverage are more likely to get reviewed. Add a test case whenever possible!_ --> Pull Request resolved: facebook#21782 Differential Revision: D12854056 Pulled By: hramos fbshipit-source-id: d1e6a395e762cc4a4f133977d54d0f469fa66b8c
… 3.2. (facebook#21782) Summary: When we use product flavor (e.g. develop/production) with Android Gradle Plugin 3.2, javascript bundle is not copied due to that merged asset path point to incorrect location. related facebook#21408 <!-- Thank you for sending the PR! We appreciate you spending the time to work on these changes. Help us understand your motivation by explaining why you decided to make this change. If this PR fixes an issue, type "Fixes #issueNumber" to automatically close the issue when the PR is merged. _Pull requests that expand test coverage are more likely to get reviewed. Add a test case whenever possible!_ --> Pull Request resolved: facebook#21782 Differential Revision: D12854056 Pulled By: hramos fbshipit-source-id: d1e6a395e762cc4a4f133977d54d0f469fa66b8c
When we use product flavor (e.g. develop/production) with Android Gradle Plugin 3.2,
javascript bundle is not copied due to that merged asset path point to incorrect location.
related #21408
Test Plan:
android/app/build.gradle
, add simple product flavorone
,two
.index.android.bundle
in apk.Release Notes:
[ANDROID][BUGFIX][react.gradle] - Fix incorrect merged asset path for Android Gralde Plugin 3.2.