Skip to content

Fix flutter run --use-application-binary #6106

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

Merged
merged 1 commit into from
Sep 28, 2016
Merged

Fix flutter run --use-application-binary #6106

merged 1 commit into from
Sep 28, 2016

Conversation

johnmccutchan
Copy link
Contributor

When using --use-application-binary:

  • Stop flutter run from checking for a pubspec.yaml in current directory
  • Stop flutter run from invoking pub get
  • Set 'shouldBuild' based on --use-application-binary
  • Stop requiring 'lib/main.dart' to be present before running.
  • Stop building an FLX when launching on Android

Generally, the code for 'running' an application on a device is conflated with 'building' a snapshot/bundle/OS-specific package, I started pulling on this thread but then backed off because the problem is so pervasive. This is sufficient for developers to start using:

$ flutter run --use-application-binary ~/path/to/built.apk

@tvolkert @devoncarew

When using --use-application-binary:

- [x] Stop flutter run from checking for a pubspec.yaml in current directory
- [x] Stop flutter run from invoking pub get
- [x] Set 'shouldBuild' based on --use-application-binary
- [x] Stop requiring 'lib/main.dart' to be present before running.
- [x] Stop building an FLX when launching on Android
@tvolkert
Copy link
Contributor

LGTM

@devoncarew
Copy link
Member

lgtm

The checks for a pubspec.yaml file should turn off when passing in an explicit .packages file path (--packages=...): https://github.com/flutter/flutter/blob/master/packages/flutter_tools/lib/src/runner/flutter_command.dart#L210. I assume a --packages arg will be necessary when running via --use-application-binary? Or perhaps just necessary when running in hot mode.

@Hixie
Copy link
Contributor

Hixie commented Sep 28, 2016

What's the purpose of this command? What is Flutter-specific about it?

@johnmccutchan
Copy link
Contributor Author

@devoncarew --packages is not necessary for non-hot mode as we already have a fully built apk including script snapshot.

@johnmccutchan johnmccutchan merged commit ca8070f into flutter:master Sep 28, 2016
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 15, 2021
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.

4 participants