Fix Product Flavour builds#5580
Conversation
jaggs6
commented
Jan 27, 2016
- Capitalise productFlavorName for target path
- Capitalise buildType in sourceName when flavour exists
- Fix the path the assets are added.
- Backward compatibility with bundleIn(buildTypeName) when flavours are added
|
By analyzing the blame information on this pull request, we identified @AndrewJack, @foghina and @mkonicek to be potential reviewers. |
|
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 - and if you have received this in error or have any questions, please drop us a line at cla@fb.com. Thanks! |
|
@jaggs6 updated the pull request. |
|
@jaggs6 updated the pull request. |
1 similar comment
|
@jaggs6 updated the pull request. |
|
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
|
Looks good 👍 |
There was a problem hiding this comment.
Won't this become the gradle task assembleflavorDebug when we want assembleFlavorDebug?
There was a problem hiding this comment.
Nope, Because it will use the targetName variable everywhere and not the sourceName one.
There was a problem hiding this comment.
It uses targetName to generate the task name:
// Bundle task name for variant
def bundleJsAndAssetsTaskName = "bundle${targetName}JsAndAssets"
There was a problem hiding this comment.
Ok! What about
def targetName = "${productFlavorName.capitalize()}${buildTypeName.capitalize()}"
def targetPath = "${buildTypeName}"
if (productFlavorName) {
targetPath = "${productFlavorName}/${buildTypeName}"
}to make it more readable and if we're not using sourceName anymore?
There was a problem hiding this comment.
Looks good. Let me test it.
There was a problem hiding this comment.
👍 yep thats better. Are we going to use this PR or #5579 ?
|
@jaggs6 updated the pull request. |
|
Looks good. How did you test this? Can you show some short examples of commands you ran to demo it works? It's just thing we do at fb that every commit should have so a called "Test Plan". |
|
@mkonicek thanks for looking into it. Here is how to test each change.
|
|
@mkonicek does the above answer your question? |
|
Cool, thanks for the test plan. Let's merge it. Sorry for the delay, just came back from vacation. @facebook-github-bot shipit |
|
Thanks for importing. If you are an FB employee go to https://our.intern.facebook.com/intern/opensource/github/pull_request/1667939000161821/int_phab to review. |
Summary: - Capitalise productFlavorName for target path - Capitalise buildType in sourceName when flavour exists - Fix the path the assets are added. - Backward compatibility with bundleIn(buildTypeName) when flavours are added Closes facebook/react-native#5580 Reviewed By: svcscm Differential Revision: D2911735 Pulled By: mkonicek fb-gh-sync-id: 6fb391a12ee27ee2a503961d8779a85d31cf5367