Skip to content
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

Add a Flutter command that builds an APK using a local build of the e… #437

Merged
merged 1 commit into from
Nov 17, 2015

Conversation

jason-simmons
Copy link
Member

…ngine

Example:
cd flutter/examples/stocks
flutter --engine-src-path /path/to/engine/src apk -o Stocks.apk -m apk/AndroidManifest.xml

@@ -113,6 +113,16 @@ class FlutterCommandRunner extends CommandRunner {
}
List<BuildConfiguration> _buildConfigurations;

String get enginePath {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it'd be better to use the BuildConfiguration logic, and loop through and build the APK for all the relevant builds, the same way that "flutter test --debug --release" tests both debug and release builds. In particular, how do you know whether to use debug or release builds this way?

Copy link
Member Author

Choose a reason for hiding this comment

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

Discussed this and decided on a policy of using the first BuildConfiguration having Android as the target platform.

@abarth
Copy link
Contributor

abarth commented Nov 17, 2015

LGTM. Note: Travis is mad.

}

BuildConfiguration config = buildConfigurations.firstWhere(
(BuildConfiguration bc) => bc.targetPlatform == TargetPlatform.android);
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: ) on next line

Copy link
Member Author

Choose a reason for hiding this comment

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

done

@Hixie
Copy link
Contributor

Hixie commented Nov 17, 2015

LGTM, just some minor nits.

…ngine

Example:
   cd flutter/examples/stocks
   flutter --engine-src-path /path/to/engine/src apk -o Stocks.apk -m apk/AndroidManifest.xml
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants