Commit Graph

175 Commits

Author SHA1 Message Date
John McCutchan
ae1881e4c7 Fix handling of empty --project-assets option (#6873) 2016-11-15 13:47:57 -08:00
John McCutchan
d54bed45f3 Support specifying a fixed list of assets on the command line (#6857) 2016-11-15 07:01:00 -08:00
Dan Rubel
34e466f1fd Refactor flutter command exit code - part 3 of 3 (#6838)
* Remove the workaround that pinned args to v0.13.6
This reverts most of the changes in commit 6331b6c8b5
* throw exception if exit code is not an integer
* rework command infrastructure to throw ToolExit when non-zero exitCode
* convert commands to return Future<Null>
* cleanup remaining commands to use throwToolExit for non-zero exit code
* remove isUnusual exception message
* add type annotations for updated args package
2016-11-14 14:21:30 -05:00
Dan Rubel
e384c0d982 Refactor flutter command exit code - part 2 (#6817)
* convert pubGet to throw ToolExit on non-zero exit code
* convert commandValidator to throw ToolExit for non-zero exit code
* convert flutter commands to throw ToolExit for non-zero exit code
* use convenience method throwToolExit
* only show "if this problem persists" for unusual exceptions
2016-11-13 22:09:03 -05:00
John McCutchan
45c95b261d Performance fixes for hot reload when using a prebuilt loader (#6821) 2016-11-11 13:28:21 -08:00
Dan Rubel
cccd917ac2 Refactor flutter command exit code - part 1 (#6803)
* convert flutter commands to use ToolExit for non-zero exit code
* add convenience method throwToolExit
* print ToolExit message iff not null
2016-11-11 10:42:09 -05:00
John McCutchan
fb3bf7a9d7 Support hot reload with a prebuilt loader (#6743) 2016-11-07 14:25:07 -08:00
Dan Rubel
abba2ebc4e cleanup test logger usage (#6560) 2016-10-27 22:52:59 +01:00
Dan Rubel
7acc996547 update Android device detection to handle adb error messages (#6521) 2016-10-27 12:06:47 +01:00
Dan Rubel
949e27ae8f improve flutter create error message (#6525) 2016-10-26 19:11:55 +01:00
Todd Volkert
904d524313 Add support for --use-application-binary on iOS (#6318)
Fixes #6283
2016-10-13 16:17:50 -07:00
Dan Rubel
aed056c64b remove flutter listen (#6198) 2016-10-05 14:11:41 -04:00
Dan Rubel
9f673ad445 flutter analyze --watch (#6093) 2016-10-04 08:20:24 -04:00
Devon Carew
d9bbd2fb53 make app ids more unique (#6113)
* make app ids more unique

* in-line the uuid class
2016-09-28 11:18:05 -07:00
Devon Carew
7238d93e13 fix devices test; print on test failure (#6039)
* fix devices test; print on test failure

* mock out a call to Doctor
2016-09-26 21:28:16 -07:00
Devon Carew
20e9fbfe6d fix an encoding issue with calling adb shell getprop (#5740)
* fix an encoding issue with calling adb shell getprop

* move code in catch block

* add a test

* switch to LATIN1 encoding
2016-09-26 12:47:34 -07:00
Dan Rubel
133a9c35db extract flutter watch from flutter analyze (#6012) 2016-09-23 09:03:23 -04:00
Dan Rubel
672d04e0d0 close sinks cleanup (#5838)
part of https://github.com/flutter/flutter/issues/5789
2016-09-13 14:15:36 -04:00
Dan Rubel
3ed3390d0c flutter analyze repo analysis options (#5707)
This updates the flutter analyze command to use the .analysis_options_flutter_analyze in the repo root when either the --flutter-repo flag is supplied or the sources being analyzed reside in the flutter repo.
2016-09-07 22:41:59 -04:00
Dan Rubel
c57635f1a8 adjust channel_test to be less specific (#5721)
* adjust channel_test to be less specific
fixes https://github.com/flutter/flutter/issues/5716
2016-09-01 22:05:03 -04:00
Dan Rubel
ef79e7a1c0 improve device matching error message (#5693)
* improve device matching error message
fixes https://github.com/flutter/flutter/issues/5675
2016-09-01 12:37:58 -04:00
Dan Rubel
e20ec2becb implement flutter format (#5606)
Implement flutter format, fixes https://github.com/flutter/flutter/issues/5338
2016-08-31 09:40:17 -04:00
Dan Rubel
83bf5d10c0 fix getDeviceById to match exact name (#5657)
* fix getDeviceById to match exact name
fixes https://github.com/flutter/flutter/issues/5508
2016-08-30 14:11:54 -04:00
Dan Rubel
194a9ef3c9 implement flutter packages get/upgrade command (#5603)
* implement flutter packages get/upgrade command
* alias flutter pub
* refactor findProjectRoot for use by multiple commands

fixes https://github.com/flutter/flutter/issues/4994
2016-08-25 22:37:48 -04:00
Chris Bracken
b5f763b45e Support a configurable build directory (#5601)
This change adds a top-level getBuildDirectory func and funcs for
android, aot, asset, ios build products.

Developers may now add a "build-dir" mapping to their
~/.flutter_settings (JSON format) config file. Output directory is
relative to the main flutter application directory.

This change also changes the default build directory for iOS builds to a
subdirectory of the configured build directory, 'build/ios' by default.
2016-08-25 16:38:19 -07:00
Dan Rubel
e47e937682 add flutter channel command (#5561)
* add flutter channel command
fixes https://github.com/flutter/flutter/issues/2513

* fix test

* address comments

* remove unused imports

* fix lints
2016-08-25 15:16:21 -04:00
Dan Rubel
1ea2f4030e enhance flutter upgrade to find project root (#5552)
* enhance flutter upgrade to find project root
fixes https://github.com/flutter/flutter/issues/2990

* address comments

* restore original formatting

* fix lints
2016-08-25 14:59:12 -04:00
Dan Rubel
f6c53d58cd Test create proj content (#5546)
* test flutter create project dart file is properly formatted

* restore driver-test

* cleanup lint warnings

* address comment
2016-08-24 14:47:29 -04:00
John McCutchan
cf2b2078d4 Send reload / restart time to frame to analytics (#5335) 2016-08-11 10:01:53 -07:00
John McCutchan
ec0f880032 Hot reload: Only sync Dart sources necessary for startup on first launch (#5333)
- [x] Update engine to bring in new snapshotter.
- [x] Use the new snapshotter to quickly determine the minimal set of files necessary to run.
- [x] On first DevFS sync, only sync files necessary to run the application.
- [x] Fix a DevFS unit test failure.
- [x] Include DevFS tests in all.dart.
2016-08-11 07:40:49 -07:00
Devon Carew
14483586e0 make flutter run work with a pre-built apk (#5307)
* make flutter run work with a pre-built apk

* refactor to remove the buildDir param
2016-08-09 14:38:13 -07:00
Ian Hickson
d7fb51a551 Hot reload UI polish (#5193)
* General improvoments to the loader app:
   * Show a message after 8 seconds if no connection comes in.
   * Show a progress bar as files are being uploaded.
   * Hide the spinner just before launching the application.

* General improvements to the "flutter run" UI:
   * Add "?" key as a silent alias for "h".
   * Make the help text bold so it doesn't get mixed with the logs.
   * Make "R" do a cold restart when hot reload is enabled.

* Supporting features and bug fixes:
   * Add support for string service extensions.

* Other bug fixes:
   * Expose debugDumpRenderTree() outside debug mode.
   * Logger.supportsColor was missing a getter.
   * Mention in the usage docs that --hot requires --resident.
   * Trivial style fixes.
2016-08-02 16:52:57 -07:00
John McCutchan
b6644733c9 Support for synchronizing assets onto a DevFS 2016-07-27 13:28:17 -07:00
John McCutchan
0de691621b Add --hot mode for flutter run 2016-07-20 14:38:25 -07:00
Devon Carew
57b76a050f Hello services run (#4969)
* making flutter run work with gradle

* locate android studio

* add test for settings

* review comments
2016-07-19 20:00:02 -07:00
Ian Hickson
f92f71feb9 Lock flutter tool while updating artifacts (#4476)
This prevents multiple simultaneous runs of the analyzer from stomping
over each other (e.g. multiple runs of 'update-packages'). Certain
long-lived commands (like analyze, run, logs) are exempted once they've
done enough work to be safe from most stomping action.

This still doesn't make us entirely safe from craziness, e.g. if you're
half way through an 'update-packages' run and you call 'git pull', who
knows what state you'll end up in. But there's only so much one can do.

Fixes https://github.com/flutter/flutter/issues/2762
2016-06-14 10:16:08 -07:00
Devon Carew
3ba17136b7 add a restart command to the daemon protocol (#4385)
* refactor the --resident run option into a separate file

* update daemon to run --resident apps

* re-plumbing daemon start

* send app logs

* update tests

* review changes

* fix test runner

* remove PackageMap.createGlobalInstance; rely on the ctor

* review comments
2016-06-07 12:13:35 -07:00
Yegor
f544abd016 modernize flutter drive w.r.t. debug/profile/release options (#4217)
* modernize `flutter drive` w.r.t. debug/profil/release options

* make error message prettier
2016-05-27 10:02:36 -07:00
Todd Volkert
cc8c78adf4 iOS tools cleanup (#4161)
* iOS tools cleanup

1) Fix `flutter install` on both device and simulator to refer to the actual
   bundle and not just the .generated folder
2) Fix `flutter run` on device to actually run vs just installing

Still TODO:
1) Discovered that isAppInstalled on iOS simulator always reports true,
   meaning it'll never actually try to install the app.

Fixes #3947
Fixes #1823
2016-05-24 16:25:40 -07:00
Devon Carew
0b5072c2ef fix check to ignore bots (#4034) 2016-05-19 10:51:31 -07:00
Ian Hickson
3252701753 Make it possible to run tests live on a device (#3936)
This makes it possible to substitute 'flutter run' for 'flutter test'
and actually watch a test run on a device.

For any test that depends on flutter_test:

1. Remove any import of 'package:test/test.dart'.

2. Replace `testWidgets('...', (WidgetTester tester) {`
      with `testWidgets('...', (WidgetTester tester) async {`

3. Add an "await" in front of calls to any of the following:
    * tap()
    * tapAt()
    * fling()
    * flingFrom()
    * scroll()
    * scrollAt()
    * pump()
    * pumpWidget()

4. Replace any calls to `tester.flushMicrotasks()` with calls to
   `await tester.idle()`.

There's a guarding API that you can use, if you have particularly
complicated tests, to get better error messages. Search for
TestAsyncUtils.
2016-05-16 12:53:13 -07:00
Devon Carew
483922d15c allow per-command analytics suppression (#3919)
* allow per-command analytics suppression

* rev the usage package dep
2016-05-15 20:06:27 -07:00
Devon Carew
40c0d6ea12 Consolidate observatory code (#3892)
* rename service_protocol.dart to protocol_discovery.dart

* add a wrapper around the obs. protocol

* use json-rpc in run

* consolidate obs. code; implement flutter run --benchmark

* review comments
2016-05-12 18:15:23 -07:00
Jason Simmons
32846de9f8 Remove ArtifactStore and move flutterRoot into Cache (#3883) 2016-05-12 15:54:35 -07:00
Jason Simmons
a590ee2671 Remove BuildConfigurations (#3879)
Artifacts from local engine builds will be found based on the --local-engine flag
2016-05-12 12:22:15 -07:00
Jason Simmons
0f53f7966b Remove Toolchain and extend ToolConfiguration to locate host tools such as sky_snapshot (#3870)
Host tools can be found in the artifact cache directory for the host platform.
If a developer wants to use a local engine build instead, then provide an
--engine-build flag that selects the specific engine build variant.
2016-05-11 15:47:26 -07:00
Devon Carew
826936cd33 use vendored dart sdk; check the expected version of flutter (#3831)
* use vendored dart sdk; check the expected version of flutter

* search up directories looking for the flutter root
2016-05-10 16:21:30 -07:00
Jason Simmons
6ab77622e4 Update flutter_tools for the "unoptimized" engine build flag and the new output directory naming scheme (#3832) 2016-05-10 12:02:09 -07:00
Hans Muller
74c3e74fba Call it Flutter Gallery (#3801) 2016-05-09 11:00:54 -07:00
Devon Carew
a5b198e9b9 remove the --checked option (#3799) 2016-05-09 10:58:47 -07:00