Commit Graph

1643 Commits

Author SHA1 Message Date
Alexandre Ardhuin
189028a958 Separate the 'if' expression from its statement (#9177) 2017-04-04 21:45:50 +02:00
Yegor
93126a85e1 warn about outdated Flutter installations (#9163) 2017-04-04 10:45:43 -07:00
Ian Hickson
57b3422795 Bold each line individually (#9069)
This should make the message in Travis logs look better.
2017-04-01 17:47:09 -07:00
Jason Simmons
e7f1361681 Update artifact names and remove obsolete artifacts (#9091) 2017-03-29 16:30:41 -07:00
Jason Simmons
72effdd27c Roll the engine and update for new binary names (#9089) 2017-03-29 15:31:36 -07:00
Yegor
3ef9909237 enable crash reporting in flutter_tools (#9039)
* enable crash reporting in flutter_tools

* fix analytics text; use relative paths

* fix test
2017-03-28 15:16:38 -07:00
Dan Rubel
52245e5082 update flutter analyze to call dartanalyzer 2017-03-28 08:44:15 -04:00
Todd Volkert
ff61962144 Update devfs_test to use MemoryFileSystem (#8811) 2017-03-27 12:55:19 -07:00
Jakob Andersen
e93f4a57a1 iOS: Make flutter doctor unhappy if CocoaPods is missing. (#8979) 2017-03-27 12:11:14 +02:00
John McCutchan
51ea62c143 Attempt to fix devfs test (#9007) 2017-03-24 12:32:45 -07:00
Ian Hickson
dfb6198feb Make the flutter test tests resilient to startup lock (#8941) 2017-03-22 11:07:58 -07:00
Jakob Andersen
f79b333882 Remove unnecessary Android SDK checks. (#8926)
* Remove unnecessary Android SDK checks.

* Remove unused accessors, skip replay test.
2017-03-22 13:51:28 +01:00
Michael Goderbauer
14933de986 Defer to operating system for whichAll (#8921)
The old `whichAll` implementation was not considering different extensions for executables on Windows. By defering to OS-built-in tools we avoid implementing it.

Fixes #8882.
2017-03-21 10:23:44 -07:00
Michael Goderbauer
d35a9db6fe Avoid downloading artifacts twice (#8872)
* Avoid downloading artifacts twice

* Don't update cache before `flutter upgrade` is executed (`flutter upgrade` might bump the engine version)
* Don't update cache twice during `flutter precache`

Fixes #8249.

* add test
2017-03-20 17:09:59 -07:00
Adam Barth
97816e1571 Rename Dismissable to Dismissible (#8919)
The latter is the proper spelling.

Fixes #8883
2017-03-20 16:17:08 -07:00
Alexandre Ardhuin
2166ea5b7f apply partially the upcoming unnecessary_lambdas (#8810) 2017-03-15 23:09:58 +01:00
Michael Goderbauer
15330ffbc4 Make ProcessSignals portable (#8779)
* Make ProcessSignals portable

This removes the need to wrap unsupported signals with in `if (!platform.isWindows) ..`.

It also allows us to implement a work around for breaking the Windows console when flutter is exited with Ctrl+C.

* review comments

* adding tests

* add license header
2017-03-15 11:28:14 -07:00
Todd Volkert
1b4f817b0c Make tests more hermetic. (#8765)
1. Add `PortScanner` abstraction so that we don't do actual port scanning
   in tests.
2. Don't change the real `cwd` of the isolate during tests, as it affects
   all tests, not just the current running test.

Fixes #8761
2017-03-14 10:28:56 -07:00
Ian Hickson
0edc4d2a76 Make hot mode a little less aggressive about catching errors. (#8743)
It was resulting in weird situations where the tool would dump an
error message and stack but not quit, or would fail hard but then just
hang.

Instead, specifically catch errors you expect. As an example of this,
there's one error we expect from the DartDependencySetBuilder, so we
catch that one, turn it into a dedicated exception class, then in the
caller catch that specific exception.
2017-03-13 14:50:30 -07:00
Devon Carew
71aaa5db91 add --offline to flutter packages get (#8707) 2017-03-13 14:04:27 -07:00
John McCutchan
31dc3c4722 Try all possible Android SDK locations before giving up (#8730)
Fixes #8618
2017-03-13 11:21:34 -07:00
Jason Simmons
3d5d63a8aa Accept any nonzero exit code as a signal of failure in the missing dependency test (#8738) 2017-03-13 11:17:09 -07:00
Dan Rubel
8742fb09fa Fix tests (#8736)
* do not forward status if stream is closed
* remove devfs test timeout
2017-03-13 13:47:29 -04:00
Todd Volkert
a4c58292b2 Fix and enable broken flutter_tools tests (#8720)
(follow-on to #8698)
2017-03-10 15:34:20 -08:00
Todd Volkert
5d29737a04 Bump mockito to version 2.0.2 (#8713) 2017-03-10 13:53:22 -08:00
Michael Goderbauer
03d3186531 Transfer URIs instead of platform-dependent file paths (#8701) 2017-03-10 10:13:53 -08:00
Todd Volkert
34ed3d2d24 Pay off some technical debt. (#8710)
* Rename `Device.platform` to `Device.targetPlatform` to avoid
  collision with the exported variable from `platform.dart`
2017-03-10 10:11:05 -08:00
Todd Volkert
83d411f979 Change flutter_tools tests to run via pub (#8698)
`all.dart` is no longer needed. Furthermore, it causes tests to
be skipped, or to silently fail to run anything.

Fixes #7941
2017-03-10 09:39:01 -08:00
Yegor
3146e13414 print less in flutter_tool tests (fixes #8641) (#8699) 2017-03-09 16:51:46 -08:00
Todd Volkert
1ada132ee8 Add first replay test (#8628) 2017-03-09 12:58:31 -08:00
Alexandre Ardhuin
6a2148dde9 prefer const constructors (#8594)
* prefer const constructors

* fix double throw
2017-03-08 14:58:14 -08:00
Alexandre Ardhuin
ce734e8f24 apply the upcoming rule : directives_ordering (#8582) 2017-03-08 14:58:09 -08:00
Alexandre Ardhuin
329e52c02c apply upcoming rule use_collection_literals_when_possible (#8649) 2017-03-08 14:57:31 -08:00
Michael Goderbauer
644e7b131d Faster hot reload (#8600)
This implements the `DartDependencySetBuilder` completely in Dart instead of calling out to `sky_snapshot` (Linux/Mac) or `gen_snapshot` (Windows) and allows us to use the same code path on all supported host platforms.

It also slightly reduces hot reload times on Linux from ~750ms to ~690ms for the unchanged flutter_gallery app and significantly reduces hot reload times on Windows from almost 1.5s to just slightly slower than on Linux.

This change will also allow us to retire `sky_snapshot` completely in the future.
2017-03-07 13:09:48 -08:00
Todd Volkert
3d079414ad Record/replay test infrastructure. (#8597)
This adds the test harness for record/replay tests.
2017-03-07 10:13:40 -08:00
Yegor
5e2d3e956a Clean up crash reporting code (#8602) 2017-03-07 08:45:06 -08:00
John McCutchan
24eeddc053 Request the user upgrade if the Android SDK version is 24 (#8462)
* Request the user upgrade if the Android SDK version is 24

* Update android_sdk_test.dart

* Update android_sdk.dart
2017-03-06 18:20:04 -08:00
Todd Volkert
96ccad53df Update flutter_tools test utils to prepare for record/replay tests (#8591)
1. Add matchers for the `ProcessExit` exception class
2. Add ability to control the setup of the `AppContext` we use in
   `testUsingContext()`
3. Clean up the code that figures out the location of `Cache.flutterRoot`
   such that it works with `pub run test`. It previously only worked
   when the tests were invoked with standalone `dart`

`#3` above will also help unblock #7941
2017-03-06 13:13:28 -08:00
Chris Bracken
33ef949efc Declare locals as final where not reassigned (#8576)
Fix a few regressions.
2017-03-03 18:40:19 -08:00
Michael Goderbauer
e0c51480d2 canonicalize paths in devfs (#8565) 2017-03-03 18:21:01 -08:00
Chris Bracken
7a09316cd0 Declare locals final where not reassigned (flutter_tools) (#8570) 2017-03-03 17:50:46 -08:00
Yegor
8738eb97bc add crash reporting without enabling it (#8518)
* add crash reporting without enabling it

* do not drop futures on the floor

* return exitCode from executable run

* debug travis

* remove unnecessary todo

* rename local fs getter
2017-03-03 16:54:47 -08:00
Michael Goderbauer
d579d58702 Enable Hot Reload on Windows (backed by gen_snapshot) (#8512)
* Enable Hot Reload on Windows (backed by gen_snapshot)

\o/

Two caveats:
* Hot Reload on Windows is slower than on other platforms because gen_snapshot is slower then sky_snapshot
* We currently cannot hot reload projects with spaces in the path

* enable tests
2017-03-02 10:57:27 -08:00
Alexandre Ardhuin
69b6bb87d1 prefer_is_empty and prefer_is_not_empty (#8474) 2017-03-01 22:17:30 -08:00
Todd Volkert
9dec5f9016 Change to use mockito_no_mirrors.dart (#8511)
This got missed in the last sweep due to concurrent PRs
2017-03-01 15:34:59 -08:00
Michael Goderbauer
17057bb44b [devFS] Use URI to represent paths on device (#8446)
* [devFS] Use URI to represent paths on device

Previosuly, regular file paths in the format of the host platform were used to represent paths on device. That works when host and device share the same (POSIX) file path format. With a Windows host, this breaks. URIs are the solution as they are platform independent and the VM service on the device already interpreted the file paths as URIs anyways.

* review comments

* switch to file paths

* fix tests on Windows

* review comments
2017-03-01 10:11:56 -08:00
Michael Goderbauer
d7d73a302f fix analyzer warning (#8484) 2017-02-28 19:45:22 -08:00
Michael Goderbauer
65835af4e6 Roll forward #8467 (#8477)
* Revert "Revert "Simplify path handling logic in dependency checker and devFS (#8414)" (#8467)"

This reverts commit 96ba7f76d2.

* Intentionally use a self-package URI in flutter_gallery

* tests to catch problems with self-package imports
2017-02-28 17:21:17 -08:00
Yegor
bfef36f710 add waitUntilNoTransientCallbacks to driver API (#8475) 2017-02-28 15:58:28 -08:00
Michael Goderbauer
96ba7f76d2 Revert "Simplify path handling logic in dependency checker and devFS (#8414)" (#8467)
This reverts commit e7bde11cc3.

Reason: broke hot reload when using "package:" style imports for sources
within the same project.
2017-02-28 11:17:26 -08:00
Todd Volkert
f60410fa9d Add --bug-report flag (#8435)
This adds support for a `--bug-report` flag, which is a recording
that:
  - includes the arguments that were passed to the command runner
  - is zipped up for easy attachment in Guthub issues
2017-02-27 15:38:47 -08:00
Michael Goderbauer
e7bde11cc3 Simplify path handling logic in dependency checker and devFS (#8414)
* Simplify path handling logic in dependency checker and devFS

Simplification will make it easier to port this to Windows.

* Roll Engine to 0a7b177c330367904597a6129b3eb653d29dfca0
2017-02-27 11:01:14 -08:00
Jakob Andersen
7f9a53b136 Relax Android Studio version check. (#8389)
It's not just $HOME/.AndroidStudio2.2, it might also be
.AndroidStudioPreview2.3, or .AndroidStudioFooBar1.7, or whatever.

Made the Version parser less throw-happy, and relaxed the directory name
checks to allow for the above.

Fixes #8353.
2017-02-24 11:59:59 +01:00
Phil Quitslund
a002e72022 Bump to test 0.12.20. (#8349)
* Bump to test `0.12.20`.

Some test `0.12.20` highlights:
  * introduces `expectLater()`  that returns a `Future` that completes when the matcher has finished running
  * deprecates the `verbose` parameter to `expect()` and the `formatFailure()` (to be removed in `0.13.0`)

Otherwise:
  * to keep up w/ the deprecation of `verbose`, removes `widget_tester` API to pass `verbose` flag (alternatively we could suppress the warning for now)

* Update stack manipulation.

* Fix framecount.
2017-02-23 15:08:25 -08:00
Jakob Andersen
3676ffe477 Fix bug parsing Gradle version. (#8326)
* Fix bug parsing Gradle version.

Version from pub_semver requires versions of the format X.Y.Z. Gradle
doesn't follow semantic versioning, though, so version parsing would
fail on versions like '3.2'. Fixed by writing a custom Version class.

Also removed a check for apksigner when building Gradle-based projects.

Fixes #8298
2017-02-22 11:53:32 +01:00
Michael Goderbauer
e552832635 fix tests on Windows for flutter tools (#8322) 2017-02-21 16:56:37 -08:00
Todd Volkert
0d2c9670fd Resolve TODOs to migrate from OperatingSystemUtils to Platform (#8314) 2017-02-21 15:11:49 -08:00
Michael Goderbauer
ac7954c11a Migrate from touch cmd to dart's built-in API (#8313)
This enables us to run more tests on Windows.
2017-02-21 15:11:37 -08:00
Michael Goderbauer
8c9e18ad0e Workaround for package:test bug (#8304)
Works around https://github.com/dart-lang/test/issues/545
2017-02-21 11:26:43 -08:00
Alexandre Ardhuin
2888139c6b prefer const constructor (#8292) 2017-02-20 14:07:16 -08:00
Jakob Andersen
77efc38b67 Teach flutter tools to find gradle (#8241)
* Teach flutter tools to find gradle

Flutter tools will now use Gradle from Android Studio, which is now found automatically.

flutter doctor will verify that Android Studio has been installed, and that the included Gradle is at least version 2.14.1.

It is still possible to manually configure the path to Android Studio (flutter config --android-studio-dir=XXX) or Gradle (flutter config --gradle-dir=XXX), but this should only be necessary if they're installed somewhere non-standard.

Only tested on Linux and macOS for now.

Fixes #8131
2017-02-20 11:02:50 +01:00
Todd Volkert
c233f38291 Update package:test dependencies to 0.12.18+2 (#8247) 2017-02-17 17:35:11 -08:00
Michael Goderbauer
cd8434d931 Refactor how Artifacts are located (#8234)
Artifacts are now located in a central place.
This will enable us to downlaod artifacts when we need them (instead of
downloading them all upfront).
This also makes replacing sky_snapshot with gen_snapshot easier.
2017-02-16 23:10:11 -08:00
Michael Goderbauer
a55a745c73 Fail tests with an actionable message when FLUTTER_ROOT is not set (#8236)
Also: Fix some analyzer warnings.
2017-02-16 18:50:28 -08:00
xster
d7b0f7db14 Support iOS screenshot 1/2 (#8210)
* Support iOS screenshot 1/3

* Use path.join

* use fs.path instead
2017-02-16 18:35:36 -08:00
xster
3985ddbcd4 Move simulator screenshot logic to use simctl (#8216)
* Move simulator screenshot logic to use simctl

* Add simulator screenshot tests
2017-02-16 12:50:27 -08:00
Michael Goderbauer
7231fd3ed6 Enable flutter drive on Windows (#8146)
... and run some more tests on Windows.
2017-02-14 13:14:52 -08:00
Chris Bracken
43650e93f4 Emit additional Xcode settings in flutter create (#8125)
On flutter run, we update ios/Flutter/Generated.xcconfig with various
Flutter-specific settings required by xcode_backend.sh during a build
from Xcode. These settings need to be present at the time the project is
loaded since Xcode doesn't pick up live updates to these files.

Without these settings, Xcode fails to locate xcode_backend.sh itself,
causing the build to fail until the Xcode project has been closed and
re-opened. This also prevents Xcode's project updater from 'helpfully'
suggesting to clean up and delete the Generated.xcconfig file.
2017-02-14 09:56:57 -08:00
Michael Goderbauer
5e54fd54d9 Ban package:path from Flutter Tools (#8119) 2017-02-13 17:45:50 -08:00
Michael Goderbauer
cff7dc5444 Bump package:process version (#8073) 2017-02-10 16:54:51 -08:00
Devon Carew
5caeb3ff32 use the intl package (#8060) 2017-02-10 09:36:04 -08:00
Chris Bracken
2ec6b31aac Fix potential NPE in iOS doctor check (#8016)
* Fix potential NPE in iOS doctor check

In case Xcode is not installed, the xcode-select path may be null.

* fixup! Fix potential NPE in iOS doctor check
2017-02-08 20:04:39 -08:00
Chris Bracken
4d8395e177 Improve doctor output when Xcode installation is incomplete (#8012)
If the developer has only installed the Xcode command-line tools,
xcode-select and some other tools may be present, but xcodebuild will be
missing. In this case, output a slightly improved message indicating
that the installation is incomplete rather than missing.
2017-02-08 18:56:08 -08:00
Devon Carew
d89f438699 improve the logger ui a bit for elapsed times (#7960)
* improve the logger ui a bit for elapsed times

* invert param

* update daemon.dart
2017-02-08 08:25:36 -08:00
Michael Goderbauer
82f887de07 Fix Flutter Tools Tests to run on Windows (#7878) 2017-02-05 22:58:49 -08:00
Chris Bracken
165e96e214 Exit with error message if ensureDirectoryExists fails (#7874)
If ensureDirectoryExists fails -- e.g. because a file file of the same
name as the directory to be created exists, ensure that we exit cleanly
with a useful error message.
2017-02-03 17:34:12 -08:00
Chris Bracken
d1d943c754 Add isToolExit, throwsToolExit test matchers (#7869)
Allows for better testing of functions that throw ToolExit to bail out.
2017-02-03 16:51:01 -08:00
Ian Hickson
be7be2b8b6 Test service extensions (#7849)
...and fix bugs that the tests uncovered.

WRITE TEST FIND BUG
2017-02-03 13:55:07 -08:00
Chris Bracken
fb72f21cdc Improved detection of unsupported iOS devices (#7857)
* Detects iPad 2 and iPad Retina as unsupported devices.
* Simplifies blacklisting logic.
* Minor improvements to error messages.
* Added unit tests.
2017-02-03 12:25:05 -08:00
Ian Hickson
dc634e195e Introduce the concept of asynchronicity to the service extensions. (#7823)
This allows us, for example, to wait for the slow mode banner to have
been removed from the screen before triggering a screen shot.
2017-02-02 15:48:35 -08:00
Chris Bracken
83514d67c4 Add doctor check for Python 'six' module (#7807)
* Add doctor check for Python 'six' module

Required as part of Xcode lldb module. In all likelihood, if we
encounter this situation, the developer is using a custom Python install
(e.g., via MacPorts or Homebrew).
2017-02-01 18:22:07 -08:00
Chris Bracken
5d2a460fdd Correct capitalisation of Xcode (#7796)
Ref: https://developer.apple.com/xcode/
2017-02-01 16:16:33 -08:00
Chris Bracken
18fcb91e88 Add tests for iOS doctor validaton (#7794) 2017-02-01 15:58:40 -08:00
Ian Hickson
68ebf64525 Remove the timeout on test_test.dart (#7754)
It was causing the flakiness because it was too short. The default timeout is better.
2017-01-30 21:17:29 -08:00
Ian Hickson
96e11e1bf1 Clean up the file names of the hot and cold runners. (#7697) 2017-01-28 14:26:49 -08:00
Ian Hickson
21434fcf1a Refactor 'flutter drive' to get the observatory port from the logs (#7695)
This remove a very brittle aspect of flutter drive, whereby it would
assume a known port instead of explicitly finding out what it was.

Fixes #7692 and hopefully fixes the devicelab tests.
2017-01-27 01:37:28 -08:00
xster
682c7992e5 Fix a crash (#7597) when the flutter sdk moves after getting packages (#7601)
* Add a check in case the flutter directory in .packages no longer exists. Clean up and prompt user

* Update documentation to use flutter packages get for end-users instead of flutter update-packages.

* Merge missing sdk error with the multiple sdk error. They're really the same thing.

* Use flutterPath in both checks.

* Change file_system’s copy folder to copy director which takes into account the file system

* Test support files

* Add test and split into 2 messages again.

* Move tests to run in memory file system's copy. Tested with dev/bots/test.sh
2017-01-26 15:43:28 -08:00
Todd Volkert
417c2f25fc Migrate flutter_tools to use package:platform (#7642) 2017-01-25 16:06:41 -08:00
xster
ee97e5639e Change file system copy folder to copy directory (#7624)
* Change file_system’s copy folder to copy director which takes into account the file system

* Address review comments.
Test with 2 different instances of file systems.
2017-01-25 11:41:48 -08:00
Michael Goderbauer
9733aab929 Fix broken device test (#7637) 2017-01-25 11:25:07 -08:00
Todd Volkert
9ba607862e Update to package:process v1.0.1 (#7607) 2017-01-24 10:09:29 -08:00
Todd Volkert
03d163ce88 Update tools to use package:process (#7590) 2017-01-23 09:46:38 -08:00
Ian Hickson
63aa1397a3 Increase the strictness of our requiring explicit types (#7585)
...now that we have generic methods, their types need to be specified too.
2017-01-23 01:04:31 -08:00
Dan Rubel
0295def2a9 Refactor DevFS for kernel code (#7529)
Refactor DevFS so that it's easier to add new types of content such as kernel code
* add tests for DevFS package scanning
* add tests for DevFS over VMService protocol
* which covers _DevFSHttpWriter and ServiceProtocolDevFSOperations
* replace AssetBundleEntry and DevFSEntry with DevFSContent
* refactor to cleanup common code and replace some fields with locals
* rework .package file generation refactor away DevFSOperations.writeSource
* only update .package file if it has changed
* only write/delete/evict assets that have been changed/removed
2017-01-22 10:37:10 -05:00
Devon Carew
34b9ce859a proxy service extension calls through the daemon protocol (#7554)
* proxy service extension calls through the daemon protocol

* add test for app.callServiceExtension
2017-01-20 08:51:57 -08:00
Todd Volkert
719712b74c Add test for AppContext (#7465) 2017-01-12 09:31:27 -08:00
Todd Volkert
bba6bff66b Move forbidden dart:io import test from Bash to Dart (#7427) 2017-01-10 16:08:51 -08:00
Adam Barth
b9f49a40f7 Handle missing flutter_test dependency cleanly (#7421)
We now produce a more reasonable error message when we're missing the
flutter_test dependency in a test. Also, remove the flutter_tools stack traces
when the engine dies.

Fixes #6187
2017-01-10 11:31:24 -08:00
Todd Volkert
016b5ab0cc Force all dart:io usage to go through 'base/io.dart' (#7390)
This ensures that accidental usages of dart:io's
file API don't creep in over time.
2017-01-09 08:37:00 -08:00
Todd Volkert
8bb270342e Update flutter_tools to use package:file throughout (#7385)
This removes direct file access from within flutter_tools
in favor of using `package:file` via a `FileSystem` that's
accessed via the `ApplicationContext`.

This lays the groundwork for us to be able to easily swap
out the underlying file system when running Flutter tools,
which will be used to provide a record/replay file system,
analogous to what we have for process invocations.
2017-01-06 16:51:44 -08:00
Todd Volkert
1c43c4e24d Bump package:file version to 1.0.0 (#7371) 2017-01-05 18:42:57 -08:00
John McCutchan
2546259a64 DependencyChecker with tests (#7268)
- [x] Introduce DependencyChecker which can determine if any dependencies have been modified.
- [x] Move the DartDependencyBuilder into a separate file.
- [x] Add unit tests for DartDependencyBuilder.
- [x] Add unit tets for DependencyChecker

Part of #7014
2016-12-15 15:05:15 -08:00
Jason Simmons
f2342a6141 Provide an empty asset manifest if the FLX does not contain any assets (#7243)
Without this, an FLX with no assets may be completely empty in AOT mode.
This will result in a warning when the engine's unzip library tries to
parse the FLX.

Fixes https://github.com/flutter/flutter/issues/7060
2016-12-13 13:43:28 -08:00
Jason Simmons
8782d95c6a Check the type of a hot reload report message (#7249)
See https://github.com/flutter/flutter/issues/7248
2016-12-13 13:43:19 -08:00
Todd Volkert
622e4396c9 Add tests for nested contexts (#7197)
This tests against the failure that was fixed in #7189
2016-12-08 09:39:32 -08:00
Todd Volkert
1155f96651 Add tests for process_manager.dart (#7178) 2016-12-07 21:03:58 -08:00
Devon Carew
bec4a6c790 updates for flutter run --machine (#7183)
* have flutter run --machine log to stdout

* add a test

* add docs; fix type annotation lint
2016-12-07 12:48:47 -08:00
Collin Jackson
211fefc217 rename Sky to Flutter and add clarifying comment to template (#7165)
* s/sky/flutter/ in Android templates

* update engine.version with a compatible engine version

* replace more SkyActivity references with FlutterActivity
2016-12-06 16:03:32 -08:00
Dan Rubel
93e662abaa Cleanup common port forwarding code (#7142)
This moves the various copies of port forwarding code in the Device subclasses into the ProtocolDiscovery class.

* move port forwarding to a common location
* throw exception if protocol Uri is not discovered or port forwarding fails
* cancel discovery protocol subscriptions on iOS launches (wasn't happening before)
* fix iOS port forwarding to match other implementations
* add tests
2016-12-06 09:19:12 -08:00
Luke Church
673745901f Use touch to avoid race condition in file modification test (#7117)
* Use touch to avoid race condition in file modification test

* Remove unused import
2016-12-05 14:40:45 +00:00
Dan Rubel
a3caafe83c update flutter doctor to display versions for installed IntelliJ plugins (#7125) 2016-12-02 18:16:04 -05:00
Dan Rubel
a9584e1214 Handle new observatory url (#7061)
* reapply handle new Observatory URL changes
Fixes https://github.com/flutter/flutter/issues/6843

* allow non numeric IPv4 addresses
Fixes https://github.com/flutter/flutter/issues/7051
2016-11-30 20:29:04 -05:00
Todd Volkert
60b19b2035 Create abstraction layer for dart:io's Process commands (#7100)
With this change, they're run via instance methods on an object
obtained through the context. This will allow us to substitute
that object in tests with replay/record versions to allow us to
mock out the os-layer in tests.
2016-11-30 08:42:42 -08:00
John McCutchan
618030e044 More AppContext cleanups (#7073) 2016-11-29 11:22:48 -08:00
John McCutchan
0b737ac57b Remove default AppContext and cleanup globals (#6999) 2016-11-29 07:54:20 -08:00
Dan Rubel
fcf41fc737 revert handle new Observatory URL (#7056)
737a55ef3e
2016-11-28 16:15:19 -05:00
Dan Rubel
737a55ef3e handle new Observatory URL (#6992) 2016-11-28 11:36:20 -05:00
Luke Church
a0c567f751 Add delay between writing file and modifying it (#6968)
* Add delay between writing file and modifying it

* Add type argument
2016-11-21 20:17:41 -08:00
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
pq
4311ddb461 Duplicate test fix. 2016-05-05 13:39:58 -07:00
pq
79d1d3a7c4 Prefer implict equals matcher in test expectations.
@Hixie: as per our conversation, a little more concise.
2016-05-04 13:58:45 -07:00
Devon Carew
e365453eac better parsing of adb devices output (#3726)
* better parsing of adb devices output

* re-order lines
2016-05-04 12:32:46 -07:00
Devon Carew
713830964c make the usage text more visible (#3693)
* make the usage text more visible

* update the look of the usage text
2016-05-03 15:17:30 -07:00
Devon Carew
c9010c91f6 fix analysis errors (#3677)
* fix analysis errors

* review comments; fix test

* re-add an export for debugPrint
2016-05-03 09:09:00 -07:00
Devon Carew
60755f6d9c fix an issue parsing adb output (#3629) 2016-04-29 09:52:44 -07:00
Devon Carew
b0dca79671 Flutter run (#3553)
* rework flutter run

* fix npe with --debug-port

* connect to obs and exit when that conneciton closes

* update todos
2016-04-27 14:43:42 -07:00
Devon Carew
adac927501 add google analytics to flutter_tools (#3523)
* add google analytics

* send in the run target type

* track device type targets

* use the real GA code

* review comments

* rev to usage 2.0

* rev to 2.2.0 of usage; add tests

* review comments
2016-04-26 16:25:11 -07:00
Devon Carew
435fdbff25 move driver create test to the flutter_tools package (#3433)
* move driver create test to the flutter_tools package

* review comments
2016-04-20 10:48:27 -07:00
Devon Carew
80fabfd3dd allow flutter create to re-gen over an existing project (#3419)
* allow flutter create to re-gen over an existing project

* add a regression test
2016-04-19 19:30:49 -07:00
Devon Carew
6f0bb20658 rename deploy to release (#3407) 2016-04-19 11:17:00 -07:00
Devon Carew
1c0a966384 rename the --develop option to --debug (#3384)
* rename the --develop option to --debug

* fail if both --debug and --deploy are specified
2016-04-18 16:41:15 -07:00
Devon Carew
29fdc7a464 rename the --release and --debug flags (#3382) 2016-04-18 13:04:59 -07:00
Devon Carew
12cac94cda Use arm deploy (#3374)
* download android-arm-deploy

* wire up --deploy to android-arm-deploy

* fix interpolation
2016-04-18 09:01:43 -07:00
Devon Carew
f132acaf1d use the new cache code to locate more artifacts (#3361)
* use the new cache code to locate more artifacts

* add todo

* review comments
2016-04-15 21:08:03 -07:00
Devon Carew
2a33e3f0c0 make flutter upgrade less verbose (#3237)
* more terse flutter upgrade

* fix an issue when updating and the engine update code has changed

* call flutter precache; add a --no-color hidden option

* fix a lint related to getters/setters
2016-04-11 11:17:09 -07:00
stevemessick
8847b86681 Add validity checks to create (#3215)
* Add validity checks to create

* Adjust indent
2016-04-08 20:37:50 -07:00
Jason Simmons
9d022ed26d Add a command that can capture a Skia picture of a Flutter frame and send it to a file or skiaserve debugger (#3165) 2016-04-07 12:33:11 -07:00
Devon Carew
653566dd23 simplify toolchain setup 2016-04-04 13:10:56 -07:00
Devon Carew
fe37825fd5 run pub with --no-package-symlinks 2016-03-29 19:02:14 -07:00
Yegor Jbanov
28b5186746 [driver] propagate exit code from package:test
Driver returns exit code 0 even when tests fail. This commit fixes it by
propagating the exit code set by `package:test`.
2016-03-28 16:19:20 -07:00
Chinmay Garde
c8377d7428 Dont differentiate between ios_arm and ios_x64 in flutter_tools
All artifacts for iOS are universal.
2016-03-21 14:41:26 -07:00
Devon Carew
f1cdf6df39 refactor; fix apk warning 2016-03-21 09:24:56 -07:00
Ian Hickson
a7016062bc Improve flutter create help text. 2016-03-20 20:06:30 -07:00
Devon Carew
99b70dab62 handle android n in the android sdk 2016-03-17 15:30:47 -07:00
John McCutchan
83e6ee36a0 Sniff service protocol port from device 2016-03-17 11:44:16 -07:00
Devon Carew
f8374cd966 consolidate build commands under the 'build' command 2016-03-17 07:22:41 -07:00
Hixie
797e27edd3 Add @override annotations to flutter framework 2016-03-14 14:02:26 -07:00
Adam Barth
e2744e9a30 Stop using a prebuilt APK
Instead, require an AndroidManifest.xml and always build an APK.

Fixes #2517
2016-03-14 13:32:00 -07:00
Ian Hickson
d745e20853 Even more types 2016-03-14 09:41:54 -07:00
Devon Carew
e939b152af rename the platform constants 2016-03-12 11:08:21 -08:00
Hixie
e6b82b6fa9 flutter analyze test
Test that flutter analyze catches no error if two imported libraries
have the same name.

Also, make tests know how to find the flutter root and fix style in one
test to be consistent with the rest of the file.
2016-03-11 14:26:38 -08:00
Devon Carew
5ad6a57007 remove some references to DeviceStore 2016-03-11 11:25:03 -08:00
Devon Carew
780e4e6212 move the analysis_options to a file 2016-03-10 13:47:20 -08:00
Yegor
c2b175d1db Merge pull request #2575 from yjbanov/ios-device-discovery
[ios] look for the best available devicetype/runtime when booting
2016-03-10 11:25:56 -08:00
Yegor Jbanov
9383466dd5 [ios] look for the best available devicetype/runtime when booting 2016-03-10 11:04:02 -08:00
Hixie
c7339de6bc Enable always_declare_return_types lint
And fix a zillion omissions this uncovered.
2016-03-09 17:57:39 -08:00
John McCutchan
9cb7001a39 Add ServiceProtocolDiscovery 2016-03-08 15:13:48 -08:00
Devon Carew
52efc7fb68 implement --watch for flutter analyze 2016-03-07 13:46:42 -08:00
Steve Messick
913315bc87 Improve the error message when a target is specified but not found.
https://github.com/flutter/flutter/issues/2368
2016-03-07 08:53:33 -08:00
Steve Messick
cea21fb7b1 Merge remote-tracking branch 'upstream/master' 2016-03-04 14:38:55 -08:00
Steve Messick
2e878746a3 Improve message when target not found 2016-03-04 14:36:32 -08:00
Devon Carew
c1caa26989 fix a mac test 2016-03-04 13:10:51 -08:00
Devon Carew
8283ce87e2 fix the stop command tests 2016-03-03 13:58:49 -08:00
Devon Carew
022047f5eb remove the isConnected() method from device 2016-02-26 13:23:48 -08:00
Yegor Jbanov
677e63b79d decouple flutter drive from flutter start
flutter start's method of finding devices to run the app on is not suitable for flutter drive.

This commit also refactors several tool services to allow mocking in unit tests.
2016-02-26 10:18:24 -08:00
Devon Carew
37290d866e additional validation for device commands 2016-02-24 11:11:23 -08:00
Yegor
3301ae7d09 Merge pull request #2097 from yjbanov/flutter-driver-create
"flutter create" can generate a basic driver test; "flutter drive" gains new options
2016-02-22 17:18:54 -08:00
yjbanov
278630e688 "flutter create" can generate a basic driver test
"flutter create" adds option `--with-driver-test` that adds
dependencies to `flutter_driver` in `pubspec.yaml` and creates
a basic driver test runnable via `flutter drive
--target=test_driver/e2e.dart`

"flutter drive" new options:

- `--keep-app-running` tells the driver to not stop the app after tests
  are done
- `--use-existing-app` tells the driver to not start a new app but use
  an already running instance
2016-02-22 17:10:31 -08:00
Devon Carew
3463d89cf6 remove iosSimulator field from ApplicationPackageStore 2016-02-22 12:37:08 -08:00
Devon Carew
67046f933d add the ability to start and stop device polling 2016-02-20 22:00:11 -08:00
yjbanov
a2b1bd4673 "flutter drive" command
Runs a test app and a driver test simultaneously, then stops the app.

Usage:

```
flutter drive --target=/path/to/test/app.dart
```

This command will look for `/path/to/test/app_test.dart` by
convention. We will expand into other ways of discovering tests in the
future.
2016-02-19 18:11:53 -08:00
Chinmay Garde
9ed4e417d0 Fix flutter_tools tests 2016-02-19 11:48:39 -08:00
Chinmay Garde
df946dd875 iOS: Treat the initial Info.plist string as a mustache template.
Use the project name to initialize the bundle name and identifier
2016-02-19 11:37:05 -08:00
Devon Carew
d5a6fceee5 add a summary option to the doctor class 2016-02-17 09:33:45 -08:00
Devon Carew
7ae6f7f391 make the ios development path less mandatory 2016-02-17 00:38:47 -08:00
Devon Carew
cc72bbc7ec rename list->devices, start->run 2016-02-13 23:50:20 -08:00
Devon Carew
dcf0b7bae6 allow any android sdk version 2016-02-13 14:37:41 -08:00
Devon Carew
2dbceafbc6 introduce globals scoped to the app's context 2016-02-09 22:03:13 -08:00
Eric Seidel
91c2255894 Skip flutter_simple in create_test on Mac for now
Returns 69 instead of 0 in the `create --out` part.
https://github.com/flutter/flutter/issues/1709

@devoncarew
2016-02-09 05:26:21 -08:00
Devon Carew
9e6d45cb03 general refactoring around device management
remove the device factory methods as well as the device cache
2016-02-06 11:49:48 -08:00
Matt Perry
5d2281b69b 'flutter start' calls 'flutter apk' if necessary.
flutter start no longer depends on a pre-built SkyShell.apk. It builds a
new one, as long as an AndroidManifest.xml exists.

We rebuild the .apk every time either AndroidManifest.xml or
flutter.yaml changes.
2016-02-03 12:21:20 -08:00
Collin Jackson
3094348ad4 Merge pull request #1483 from collinjackson/engine_safety
In addition to checking for the existence of the engine, ensure that it’s the correct version
2016-02-01 16:10:03 -08:00
Collin Jackson
beaffecb7b fix #1443 ensure engine is the correct version 2016-02-01 13:11:30 -08:00
Devon Carew
78e05884ed refactor flutter logs 2016-02-01 12:56:46 -08:00
Devon Carew
d7fbf5302d use status(), error(), and trace() for logging
rename to printTrace(), printStatus(), and printError()
2016-01-28 12:44:17 -08:00
Devon Carew
76d069f9c0 rename the init command to create 2016-01-27 14:37:29 -08:00
Devon Carew
7ac4e6248f refactor the list command 2016-01-27 14:03:41 -08:00
Devon Carew
080896a305 improve device notification support 2016-01-25 13:50:59 -08:00
Devon Carew
5bce2fbdec refactor platform specific code out of device.dart
remove device type specific checks
2016-01-22 10:51:49 -08:00
Devon Carew
5ac6f9313d Merge pull request #1305 from devoncarew/device_notification
Device notification
2016-01-20 10:03:56 -08:00
Devon Carew
87e6b9a082 name and grammar tweaks 2016-01-20 08:38:50 -08:00
Devon Carew
8bb8e1d9e7 add device notifications to the daemon command 2016-01-19 21:29:20 -08:00
Devon Carew
e5beea64d2 add tests 2016-01-19 14:33:02 -08:00
Devon Carew
ff74ba812d remove noSuchMethod hints 2015-12-21 14:57:20 -08:00
Adam Barth
9662d49e12 Clean up code organization in flutter_tools
1) Moved basic utility code into base/ directory to make it clear which code
   doesn't depend on Flutter-specific knowldge.
2) Move the CommandRunner subclasses into a runner/ directory because these
   aren't commands themselves.
2015-11-28 21:16:55 -08:00
Devon Carew
8500aca7ad fix analysis errors; add missing icon 2015-11-24 23:19:25 -08:00
Adam Barth
ae585eb12e Remove start_test
This test was a bad mock-based test that hasn't ever caught a bug but has
required a lot of maintenance. Currently its broken because its mock doesn't
match the real interface.
2015-11-24 17:44:15 -08:00
Adam Barth
860547c1d4 Add support for system-level routing
Now you can supply a route argument to flutter start:

  $ flutter start --route /foo

which will start the app at /foo instead of /.
2015-11-24 16:13:20 -08:00
Adam Barth
cada8b3faa Import path.dart as path rather than p
Fixes #311
2015-11-17 22:44:54 -08:00
Adam Barth
da0a12c611 Rename sky_tools to flutter_tools 2015-11-10 13:20:35 -08:00
Adam Barth
6e7f575950 flutter start should give better errors when it can't find main
Now we suggest using -t to specify the main Dart file.

Fixes #53
2015-11-09 11:31:11 -08:00
Adam Barth
2710e0f468 Teach flutter init how to depend on flutter using a relative path 2015-11-07 21:30:26 -08:00
Adam Barth
113500206a Remove the --http option 2015-11-06 20:17:24 -08:00
Adam Barth
3804107e2d Enable --no-http by default
We still have the --http option as a fallback for now. Once we're confident the
--no-http version works, we'll drop the --http support.

Also, create the FLX in a temp directory and then delete the temp directory
when we're done. Finally, pull the Linux artifacts from the cloud storage
bucket that the buildbot is uploading to.
2015-11-03 19:39:47 -08:00
Devon Carew
7d0a298b0b start a daemon command
wrap up first daemon implementation
2015-11-03 15:58:02 -08:00
Devon Carew
5dc4a7cce4 abstract some OS operations 2015-11-02 13:07:56 -08:00
Devon Carew
4c99319f5d Merge pull request #156 from devoncarew/skip_test_windows
skip a test on windows
2015-10-31 13:57:46 -07:00
Adam Barth
94b472ff67 Add a --no-http flag to start command
This flag builds a local FLX file and pushes that to the device instead of
using an HTTP server.
2015-10-31 12:18:03 -07:00
Devon Carew
39cf521896 skip a test on windows 2015-10-30 13:13:58 -07:00
Devon Carew
15acf8ef6b increase test timeout 2015-10-29 16:45:11 -07:00
Devon Carew
b7f918c92b change how we specify test timeout 2015-10-24 12:33:17 -07:00
Devon Carew
98d61fc181 create an all.dart test script to work around an issue with pub run test on windows 2015-10-24 12:28:05 -07:00
Devon Carew
e7da41afd5 Update init_test.dart
Increase the test timeout for the `init` test to 2 minutes (test was timing out downloading assets on appveyor).
2015-10-24 11:42:19 -07:00
Devon Carew
5dbeb8f018 fix tests on windows
remove a runInShell arg on windows when launching pub
2015-10-23 22:44:56 -07:00
Devon Carew
bb1da703a6 return exit codes on failures 2015-10-17 11:50:23 -07:00
Adam Barth
12f75817ce Refactor the build command so that it can be used internally
Instead of calling through `pub` to invoke build, this patch refactors the
build command so that it can be called directly.
2015-10-13 10:00:06 -07:00
Adam Barth
8df5e9f738 Polish up some error handling
This patch improves the error handling for several arbitrary issues I
encountered while experimenting with the tool this evening.
2015-10-12 00:55:13 -07:00
Adam Barth
bdd20661d7 Teach sky_tools about prebuilt artifacts
This patch makes `flutter start` work without a clone of the engine git
repository. Making this work pulled a relatively large refactor of how the
commands interact with application packages and devices. Now commands that want
to interact with application packages or devices inherit from a common base
class that holds stores of those objects as members.

In production, the commands download and connect to devices based on the build
configuration stored on the FlutterCommandRunner. In testing, these fields are
used to mock out the real application package and devices.
2015-10-12 00:03:55 -07:00
Ian Fischer
a6a3f212ee IOSSimulator implementation.
Also fixes some minor bugs with iOS and Android interactions.
2015-10-11 19:36:06 -07:00
Adam Barth
287817f224 Move Command subclasses into commands directory
I'm trying to get a feel for the code by writing some simple cleanup patches.
2015-10-09 23:22:20 -07:00
Ian Fischer
ae32410995 Get iOS devices working on Mac if you specify sky-src-path. 2015-10-09 16:23:33 -07:00
Ian Fischer
f4ec459c23 Add support for log commands on iOS. 2015-10-08 15:10:25 -07:00
Ian Fischer
844678ddce Add implementation of start and stop commands for iOS. 2015-10-07 15:44:02 -07:00
Devon Carew
3694517617 run tests sequentially 2015-10-06 16:00:24 -07:00
Devon Carew
f98f134ccf ws changes to prod the build 2015-10-06 15:48:04 -07:00
Ian Fischer
a9cbe436c4 Merge pull request #67 from iansf/ios_basics
Beginning implementation of IOSDevice. Implements list and install.
2015-10-06 14:20:53 -07:00
Devon Carew
524d8379f4 more verbose test failures 2015-10-06 12:08:08 -07:00
Ian Fischer
12192d00c1 Beginning implementation of IOSDevice. Implements list and install.
Also update tests to be compatible with the presence of iOS and add tests for list and install.
2015-10-06 11:46:29 -07:00
Ian Fischer
d07ca92995 Basic sky_tools list command, Android implementation, and test. 2015-10-01 08:43:57 -07:00
Ian Fischer
b8085cd033 Add sky_tools trace command, Android implementation, and basic test. 2015-09-30 14:02:29 -07:00
Ian Fischer
00bed774ce Add listen command and basic test, and don’t do unnecessary repeated work when listening or poking the android server. 2015-09-29 17:10:47 -07:00
Ian Fischer
6a5fe19540 Basic sky_tools logs test. 2015-09-29 14:26:42 -07:00
Ian Fischer
8cac55a4e2 Add sky_tools start command and associated android support. 2015-09-29 09:54:10 -07:00
Ian Fischer
fa59233746 Add stop command and supporting Android support. 2015-09-25 16:16:19 -07:00
Devon Carew
c35c06e6f2 rename sky ==> flutter in the starting app template 2015-09-25 13:28:21 -07:00
Ian Fischer
cae053c353 Refactor all the commands to be Commands from the Args package. Also use CommandRunner for the top-level command. 2015-09-24 15:51:23 -07:00
Ian Fischer
343d96a48e Some basic tests for AndroidDevice that don’t require a device to be attached. 2015-09-22 15:17:11 -07:00
Ian Fischer
0cc758d24e Set up plumbing for getting relevant paths to the right places without too much global state.
`dart bin/sky_tools.dart --debug --sky-src-path=/path/to/sky/src/ install` now works.
2015-09-22 11:17:39 -07:00
Ian Fischer
c5ea40980a Most of the infrastructure needed to install an APK on Android. 2015-09-16 12:56:10 -07:00
Devon Carew
e6b45c5023 use mokito in the init tests 2015-09-11 16:12:27 -07:00
Ian Fischer
ab441685e2 Test install command 2015-09-11 15:26:55 -07:00
Devon Carew
a03deafac8 update the sky_tools template and readme 2015-08-09 23:50:16 -07:00
Devon Carew
b114623b1a fix typo 2015-08-07 14:26:50 -07:00
Devon Carew
2efd13159c add a sky_tools init command to create a new project 2015-08-07 14:20:14 -07:00