Skip to content

Use Build Variants view to control Flutter build mode #4134

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

Closed
wants to merge 1 commit into from

Conversation

stevemessick
Copy link
Member

After creating an add-to-app module in an Android app, use Android Studio's Build Variants tool window to set the build variant for the "flutter" module. That value (debug/profile/release) will be passed as the corresponding parameter to the build command when a build is initiated from the menu, Build > Flutter > Build {AAR,APK,App Bundle,iOS}.

The add-to-app (Flutter) module must be selected to see the Build > Flutter menu.

@devoncarew @xster @matthew-carroll for comments on using the tool window this way.

Screen Shot 2019-11-22 at 2 13 09 PM

@matthew-carroll
Copy link

@stevemessick does this change impact how the Flutter module is listed under dependencies in build.gradle?

@stevemessick
Copy link
Member Author

@matthew-carroll No. However, if the buildTypes are deleted then the option won't show up in the view.

Copy link
Contributor

@DaveShuckerow DaveShuckerow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool! Glad to see this logic get simplified.

@stevemessick stevemessick mentioned this pull request Nov 25, 2019
14 tasks
@stevemessick
Copy link
Member Author

flutter/flutter#44797 means this is not needed anymore.

@xster xster mentioned this pull request Nov 25, 2019
8 tasks
@stevemessick stevemessick deleted the build-mode branch December 3, 2019 18:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants