Commit graph

1738 commits

Author SHA1 Message Date
Mikkel Nygaard Ravn 1731a16d81 Make consistent use of gradle wrapper (#10993) 2017-06-29 09:48:01 +02:00
xster 57746f38c0 Guess sign iOS with the first certificate when running in machine mode (#10870)
* Guess sign with the first certificate when multiple are available in machine mode

* review
2017-06-28 13:33:14 -07:00
Chris Bracken a41e354a55 Emit CocoaPods output if pod install fails (#11018)
In the case where the CocoaPods 'pod install' step fails, emit its
stdout to provide any potentially-useful error messages to the user.
2017-06-28 11:58:06 -07:00
Chris Bracken e04907a48b Ensure Xcode major, minor version always return non-null (#10980)
Previously, xcodeMajorVersion and xcodeMinorVersion returned null unless
xcodeVersionSatisfactory had been called first. We now compute them on
demand, and cache the resultant values.
2017-06-26 13:37:59 -07:00
Mikkel Nygaard Ravn c5999c74c0 Add gradle wrapper to project template (#10928) 2017-06-26 12:47:43 +02:00
Devon Carew f946171817 update our build bot exclusions (#10964) 2017-06-25 21:17:39 -07:00
Chris Bracken 2ebb9e5dc6 Use ProcessManager for Xcode tool invocations (#10955)
1. Run all Xcode tool invocations through ProcessManager, which allows
us to mock out failures, etc. for tests.

2. Add said tests.
2017-06-23 18:50:27 -07:00
Ian Hickson d131a8df42 Fix --keep-app-running default and make devicelab verboser (#10957) 2017-06-23 18:09:37 -07:00
Chris Bracken 845c1b7f01 Re-land Lazily initialise Xcode installation status (#10952)
This reverts commit 3e265e9e42.

Rather than pre-compute Xcode install path, version, and EULA status,
compute and cache on demand.
2017-06-23 16:58:14 -07:00
Chris Bracken 3e265e9e42 Revert "Lazily initialise Xcode installation status (#10945)" (#10951)
This reverts commit bb8e2a7ccd.

Triggers a doctor failure on the Mac chromebots.
2017-06-23 16:08:36 -07:00
Chris Bracken bb8e2a7ccd Lazily initialise Xcode installation status (#10945)
Rather than pre-compute Xcode install path, version, and EULA status,
compute and cache on demand.
2017-06-23 15:56:44 -07:00
Ian Hickson 9adb4a78a6 Deep linking: automatically push the route hiearchy on load. (#10894)
The main purpose of this PR is to make it so that when you set the
initial route and it's a hierarchical route (e.g. `/a/b/c`), it
implies multiple pushes, one for each step of the route (so in that
case, `/`, `/a`, `/a/b`, and `/a/b/c`, in that order). If any of those
routes don't exist, it falls back to '/'.

As part of doing that, I:

 * Changed the default for MaterialApp.initialRoute to honor the
   actual initial route.

 * Added a MaterialApp.onUnknownRoute for handling bad routes.

 * Added a feature to flutter_driver that allows the host test script
   and the device test app to communicate.

 * Added a test to make sure `flutter drive --route` works.
   (Hopefully that will also prove `flutter run --route` works, though
   this isn't testing the `flutter` tool's side of that. My main
   concern is over whether the engine side works.)

 * Fixed `flutter drive` to output the right target file name.

 * Changed how the stocks app represents its data, so that we can
   show a page for a stock before we know if it exists.

 * Made it possible to show a stock page that doesn't exist. It shows
   a progress indicator if we're loading the data, or else shows a
   message saying it doesn't exist.

 * Changed the pathing structure of routes in stocks to work more
   sanely.

 * Made search in the stocks app actually work (before it only worked
   if we happened to accidentally trigger a rebuild). Added a test.

 * Replaced some custom code in the stocks app with a BackButton.

 * Added a "color" feature to BackButton to support the stocks use case.

 * Spaced out the ErrorWidget text a bit more.

 * Added `RouteSettings.copyWith`, which I ended up not using.

 * Improved the error messages around routing.

While I was in some files I made a few formatting fixes, fixed some
code health issues, and also removed `flaky: true` from some devicelab
tests that have been stable for a while. Also added some documentation
here and there.
2017-06-23 14:58:29 -07:00
Todd Volkert f18083d448 Print ADB output when adb install fails (#10933)
Fixes #10929
2017-06-23 14:08:07 -07:00
Chris Bracken f4f81e9ac7 Require Xcode >= 8.0 for iOS development (#10932)
This allows us to take advantage of improved command-line tooling (e.g.,
improvements in device listing in Instruments). Now that the engine is
built with Xcode 8 and the framework is tested against Xcode 8, this
reduces the set of configurations we need to support to allow us to
focus on the supported ones: Xcode 8 and Xcode 9.
2017-06-23 14:07:01 -07:00
Chris Bracken 9a6a3e1e27 Delete unnecessary print statement (#10937)
This print statement provides no value to the user.
2017-06-23 14:06:10 -07:00
Zachary Anderson 09bdab201d [fuchsia_reload] Use ssh instead of netcp/netruncmd (#10436) 2017-06-22 22:08:20 -07:00
Hans Muller b55441a027 Do not require main asset files if variants are provided (#10901) 2017-06-22 16:45:57 -07:00
Zachary Anderson 4d490666b3 Clean up pre-existing DevFS during creation (#10843) 2017-06-22 09:48:31 -07:00
xster 02245234b6 Save development certificate choice (#10849) 2017-06-21 17:22:13 -07:00
Devon Carew 963b90edf0 send the FLUTTER_HOST env var as analytics' app installer ID (#10889) 2017-06-21 13:02:40 -07:00
Seth Ladd b231006ce7 analytics expects a format of cd<integer> for custom dimensions (#10864) 2017-06-21 10:54:37 -07:00
Brian Slesinsky f01e9418fc change --machine flag for flutter test to report test progress as JSON (#10848)
(The Flutter plugin will use this to update the UI with test progress.)
2017-06-20 14:40:42 -07:00
Jason Simmons 1be406b1b5 Move the discovered Java installation to the front of PATH when running sdkmanager (#10846)
Fixes https://github.com/flutter/flutter/issues/10703
2017-06-20 09:53:01 -07:00
Seth Ladd b471a9cffc send channel name as a custom dimension (#10814)
* send channel name as a custom dimension

* tweaks from review

* remove unused import
2017-06-20 08:20:57 -07:00
Devon Carew c14470e0c7 dont' validate against webstorm (#10828) 2017-06-20 06:46:43 -07:00
Chris Bracken 400a62d121 Eliminate use of ideviceinfo in flutter_tools (#10804)
This libimobiledevice tool is no longer used anywhere in the flutter_tools codebase.
2017-06-19 13:36:05 -07:00
Chris Bracken 1d9f009579 Re-enable use of instruments for iOS device lookup (#10838)
This reverts commit b2909a245a.

This resubmits the following patches:

1. Use Xcode instruments to list devices (#10801)
Eliminates the dependency on idevice_id from libimobiledevice. Instead,
uses Xcode built-in functionality.

2. Make device discovery asynchronous (#10803)
Migrates DeviceDiscovery.devices and all device-specific lookup to be
asynchronous.
2017-06-19 13:14:57 -07:00
Jason Simmons cfa0a2dbbd Look for APKs at the path used by Android Gradle plugin 3.0 (#10798)
Fixes https://github.com/flutter/flutter/issues/10630
2017-06-19 09:37:39 -07:00
Luke Church 4b707c194f Change for consideration: URL for plugin text (#10720) 2017-06-18 21:18:36 +02:00
Chris Bracken b2909a245a Revert use of Xcode instruments for device lookup (#10806)
* Revert "Make device discovery asynchronous (#10803)"
This reverts commit 972be9c8b4.

* Revert "Use Xcode instruments to list devices (#10801)"
This reverts commit 37bb5f1300.

This is to resolve a failure that looks related to a bad install of Xcode 8.0
on our build bots and should be reinstated when the infra issue is diagnosed
and resolved.

Instruments worked well when this was originally landed, and on the
following commit, but started failing two commits after this originally
landed. Manual invocation of instruments on the build host currently
results in:

```
dyld: Library not loaded: @rpath/InstrumentsAnalysisCore.framework/Versions/A/InstrumentsAnalysisCore
  Referenced from: /Applications/Xcode8.0.app/Contents/Developer/usr/bin/instruments
  Reason: image not found
Abort trap: 6
```

It appears the /Applications/Xcode8.0.app/Contents/Applications
directory (which contains Instruments) is missing on the host.
2017-06-16 19:00:31 -07:00
Chris Bracken 972be9c8b4 Make device discovery asynchronous (#10803)
Migrates DeviceDiscovery.devices and all device-specific lookup to be
asynchronous.
2017-06-16 17:47:06 -07:00
Chris Bracken 37bb5f1300 Use Xcode instruments to list devices (#10801)
Eliminates the dependency on idevice_id from libimobiledevice. Instead,
uses Xcode built-in functionality.
2017-06-16 16:02:28 -07:00
Chris Bracken 66502138af Extract all libimobiledevice invocations to IMobileDevice class (#10793)
Moves all remaining calls to tools that are part of the libimobiledevice
suite of tools to the IMobileDevice class. This allows for better
tracking of this dependency, and easier mocking in tests.
2017-06-16 14:33:49 -07:00
xster 03393510ba address comments (#10786) 2017-06-16 14:22:10 -07:00
Yegor 3b6d84b083 modernize iOS device lookup in driver (#10780) 2017-06-16 12:58:23 -07:00
Chris Bracken b474557ef4 Eliminate unnecessary public getters for iOS tools (#10784)
None of these is used outside of devices.dart and being public covers up
analysis warnings when they're unused.
2017-06-16 11:20:23 -07:00
Chris Bracken 73df49a0d9 Eliminate unused libimobiledevice tool refs (#10778) 2017-06-16 10:42:07 -07:00
Chris Bracken bcac3166ab Eliminate direct invocations of idevice_id for iOS (#10777)
All invocations should go via the IMobileDevice class in mac.dart.
2017-06-16 10:41:48 -07:00
Chris Bracken c04f712a23 Refactor Xcode instance lookup (#10763)
Use a top-level getter in mac.dart rather than a static instance getter
and a top-level getter in ios_workflow.dart. Makes this code consistent
with how we do context lookups elsewhere.
2017-06-15 19:24:07 -07:00
Chris Bracken d6ec71d2c0 Extract libimobiledevice tools interface (#10759)
Extract out IMobileDevice class, move class to idevice_id, ideviceinfo
(and eventually other libimobiledevice tools such as iproxy) behind this
interface.

Add tests for the case where libimobiledevice is not installed, the case
where it returns no devices, and the case where it returns device IDs.
2017-06-15 19:03:24 -07:00
xster 45446ae21b first round of future awaits (#10760) 2017-06-15 18:49:19 -07:00
xster e56c8850ce Fix simctl race (#10757)
* remove usages of booted

* fix
2017-06-15 18:31:10 -07:00
xster 432ffde52e remove usages of booted (#10741) 2017-06-15 18:25:09 -07:00
Chris Bracken 615410d2d2 Inject iOS, Android workflows via context (#10750)
Eliminates the need for the device/daemon code to get at the iOS/Android
tooling indirectly via Doctor. In tests, we now inject the workflow
objects (or mocks) directly.
2017-06-15 16:11:08 -07:00
Brian Slesinsky d1feb1ad5f Coverage: fix installHook API (#10747)
- remove unused collector parameter
- clarify a comment
- inline _currentPackageTestDir
2017-06-15 14:39:46 -07:00
Chris Bracken 1bc54e0657 Eliminate dead iOS device mock code (#10732)
This code is unused in any test. In upcoming changes that migrate to
Xcode instruments based device listing, we'll mock out the instruments
output separately.
2017-06-15 11:32:39 -07:00
Todd Volkert 747e25e891 Fix devfs directory scanning to not attempt to scan non-existent directories (#10727) 2017-06-15 10:29:42 -07:00
Dan Rubel befe019896 flutter analyze --watch --flutter-repo check package conflicts (#10641) 2017-06-13 20:50:53 -04:00
Brian Slesinsky e329356f0f Oops, fix code coverage (#10672)
And add comments explaining why.
2017-06-13 14:42:09 -07:00
Brian Slesinsky 3528cd6f2d flutter test: add --machine flag (#10520)
Currently this just prints the observatory URL as a JSON event.
Refactored the code to make this fit in.
2017-06-13 13:26:32 -07:00
Todd Volkert 37e32d5aee Switch flutter --version --json to be flutter --version --machine (#10627) 2017-06-12 12:23:13 -07:00
Ian Hickson 0f1a703a6b More documentation (#10589) 2017-06-08 17:13:03 -07:00
Phil Quitslund 95544383ef Bump to Dart SDK 1.24.0-dev.6.7. (#10585)
* Bump to Dart SDK 1.24.0-dev.6.7.

* nits and fixes
2017-06-08 15:15:18 -07:00
xster c2b0a30c57 Add more instructions and handling for first time iOS run (#10521)
* Before tests

* Add the part to trust the cert on the device

* flip the error checks since some are more specific and are more actionable

* add tests

* review
2017-06-07 15:56:13 -07:00
Todd Volkert e9c7f604e9 Make generated Java folder names match package names. (#10537) 2017-06-07 13:16:16 -07:00
Kevin Moore 1b56cb790c Add --version-json to flutter CLI (#10538)
closes https://github.com/flutter/flutter/issues/10534
2017-06-06 18:40:32 -07:00
Todd Volkert 078b380d51 Remove underscores from Android identifier during flutter create (#10506)
Fixes #10077
2017-06-05 11:25:46 -07:00
Chris Bracken d65b9fb6dc Update tracking bug for SDK spaces in doctor (#10504) 2017-06-05 09:42:45 -07:00
Chris Bracken fe520201b8 Emit doctor error if Flutter SDK path contains spaces (#10477)
Should be reverted when https://github.com/flutter/flutter/issues/6577
is fixed.
2017-06-02 18:49:32 -07:00
xster cb959724cb Small setup doc for the app store option (#10418)
* Small setup doc for the app store option

* review notes
2017-06-02 16:01:20 -07:00
Devon Carew 38891a2f72 IntelliJ and Flutter plugin version checks (#10454)
* add min version checks for IntelliJ

* validate the installed versions of IntelliJ and the flutter plugin

* review comments
2017-06-02 15:23:36 -07:00
Devon Carew 15928fbdf7 have app loggers log to their parent logger (#10402)
* have app loggers log to their parent logger

* rename field to parent

* add todo

* revert flutter_tools.iml change

* ping the bots
2017-06-02 15:22:46 -07:00
Gary Qian a367dcb02c Add flags to pass '--enable-software-rendering' flag to engine in run command (#10449) 2017-06-02 09:44:36 -07:00
Chris Bracken 9c502cba95 Clean up ideviceinstaller doctor messages (#10408)
Eliminates nearly-duplicate install instructions for libimobiledevice,
ideviceinstaller.

Since ideviceinstaller depends on libimobiledevice, it's almost certain
that if libimobiledevice isn't installed, or needs updating, so does
ideviceinstaller.
2017-05-31 12:08:45 -07:00
Chris Bracken 479e533b01 Clarify libimobiledevice doctor check message (#10406)
This message will be emitted both when libimobiledevice requires
updating, or when it has not yet been installed.

It's also not specifically the version of Xcode that it's incompatible
with, it's the lockdownd daemon, which is actually more closely tied to
iTunes.
2017-05-31 11:32:26 -07:00
Hans Muller f68c6fb814 Fix package_test flakiness, init ensure terminal context entry is set (#10333) 2017-05-25 16:35:38 -07:00
Mikkel Nygaard Ravn 251d83a4b5 Add org option to flutter create (#10290) 2017-05-24 16:19:16 +02:00
Mikkel Nygaard Ravn 10f6483003 Add Swift and Kotlin templates (#10259) 2017-05-24 08:22:50 +02:00
xster 04aeef84db Let iOS flutter run auto-sign default to first profile (#10181)
* Let run default to first profile

* fix

* review notes
2017-05-23 18:05:47 -07:00
Chris Bracken 49cec4593a Apply minor formatting fixes (#10261) 2017-05-22 17:08:49 -07:00
Chris Bracken dd1456ffbc Make most ios_workflow host tool calls async (#10260)
Does not yet migrate hasIdeviceId since that results in a cascade of
breaking interface changes that's significant enough for a separate
patch.
2017-05-22 16:09:48 -07:00
Michael Goderbauer 9a908f7558 Revert "Partial rollback of #10204" (#10258)
* Revert "Test installation status when ideviceid is not installed (#10254)"

This reverts commit 0e5d4a8771.

* Revert "Partial rollback of #10204 (#10256)"

This reverts commit b291bf5d6a.
2017-05-22 16:06:22 -07:00
Chris Bracken 0e5d4a8771 Test installation status when ideviceid is not installed (#10254)
Ensure that flutter doctor returns a partial installation status when
ideviceid is not installed.
2017-05-22 14:09:37 -07:00
Michael Goderbauer b291bf5d6a Partial rollback of #10204 (#10256)
This broke Fuchsia as they haven't updated to Dart 1.24 yet :(
2017-05-22 13:28:59 -07:00
Todd Volkert aa9c782693 Add initial list of known Android hardware (#10249)
Our emulator detection was based on a simple heuristic that was
failing for the Samsung Galaxy S8. Any heuristic is flawed since
Android devices can report whatever they want to adb, but this
change attempts to tighten the detection by listing known models
(by their ro.hardware property). Again, these values could be
spoofed by emulator system images, but it's less likely to be
an issue than with our previous (and fall-back) heuristic.

Fixes #10203
Related: #10248
2017-05-22 10:47:02 -07:00
Michael Goderbauer d33fd923bf Print locale in flutter doctor (#10204)
This helps to debug encoding issues that are believed to only happen for certain locales (see https://github.com/flutter/flutter/issues/10198 fo example).

DO NOT SUBMIT until Dart SDK has been bumped (https://github.com/flutter/flutter/pull/10110) as this depends on new API.
2017-05-22 10:21:10 -07:00
Alexander Aprelev 5b1e972948 Filter out '\n' from terminal input. (#10220)
* Remove '\n' from terminal input.

* Use trim instead of replaceAll

* Add unit test

* Cleanup the test

* Fixed lint

* Style adjustments

* Forgotten @override

* Revert "Forgotten @override"

Accidently added extra files.

This reverts commit 0aba24fc8e.

* Just @override change
2017-05-21 15:15:44 -07:00
Todd Volkert a88379399e Don't fail assert when we send an error to the plugin. (#10207) 2017-05-19 12:34:41 -07:00
Ian Hickson 77d67c9d30 fix flutter analyze --dartdocs (#10182) 2017-05-19 08:46:34 -07:00
Michael Goderbauer fdbb1fbbc7 Add a note about how to edit platform code in IDE to flutter create --plugin (#10189) 2017-05-18 18:18:51 -07:00
xster 9d3fb1f309 Auto provision iOS deploy 2/3 - prompt user to choose a certificate (#10025)
* first pass

* improvements

* extract terminal.dart

* rebase

* add default terminal to context

* The analyzer wants the ../ imports in front of the ./ imports

* review notes
2017-05-18 11:26:43 -07:00
Ian Hickson 73dcca65f7 Nits for protocol discovery (#10112)
Rather than complain about these in a code review I figured I'd just fix them. :-)
2017-05-16 11:38:07 -07:00
Todd Volkert 10decc7c19 Fix race condition in protocol_discovery.dart (#10092)
For some reaosn, when we discovered our URI, we were re-instantiating
the `Completer` instance variable whose future we listen to in `nextUri()`.
This led to a race between a caller calling `nextUri()` and us discovering
the URI. If we happened to discover our URI before a caller called
`nextUri()`, then they would be left waiting on a future from the newly
allocated `Completer` (which would never complete).

Fixes #10064
2017-05-16 08:25:51 -07:00
xster b232a84b0d Auto provision iOS deploy 1/3 - find and use the first valid code signing certs (#9946)
* blind wrote everything except the user prompt

* works

* Add some logical refinements

* Make certificates unique and add more instructinos

* print more info

* Add test

* use string is empty

* review notes

* some formatting around commands

* add a newline
2017-05-15 12:54:32 -07:00
Ian Hickson db84df230d Some tools to dump other trees. (#9999) 2017-05-12 15:51:58 -07:00
Ian Hickson 292abf7223 "flutter packages pub ..." to passthrough to dart pub (#10044) 2017-05-12 15:40:35 -07:00
Ian Hickson 18eac03d76 VerboseLogger should just wrap the parent Logger (#10020)
This way, you can test things even with a VerboseLogger.
2017-05-12 10:00:11 -07:00
Devon Carew 2f737cf94e change a printStatus() to a printTrace() (#9992) 2017-05-11 08:49:26 -07:00
Ian Hickson dddf572780 Minor tweaks to flutter doctor (#9963) 2017-05-10 16:28:12 -07:00
Todd Volkert ff7d9432b8 Allow for different adb server version messages in device detection (#9974) 2017-05-10 15:51:08 -07:00
Jason Simmons d1fa21166b Use runCommand to start sdkmanager and adjust the executable name for Windows (#9962)
Fixes https://github.com/flutter/flutter/issues/9954
2017-05-10 12:42:42 -07:00
Jason Simmons d780c4b205 Revert "Gracefully handle !isValid in AndroidStudio.gradleExecutable (#9893)" (#9934)
Fixes https://github.com/flutter/flutter/issues/9929
2017-05-09 13:11:29 -07:00
Todd Volkert a667bf935e Gracefully handle !isValid in AndroidStudio.gradleExecutable (#9893)
Fixes #9866
2017-05-09 10:54:54 -07:00
Jason Simmons f44ba8b9c9 Add a flutter doctor --android-licenses command that locates and runs the Android SDK license manager (#9892)
See https://github.com/flutter/flutter/issues/8438
2017-05-09 10:18:45 -07:00
Mikkel Nygaard Ravn 76dbfe9a38 Fixed android template (#9917) 2017-05-09 14:41:39 +02:00
Mikkel Nygaard Ravn c1feee93d3 iOS plugin registry (#9818) 2017-05-09 12:00:07 +02:00
Mikkel Nygaard Ravn 24a3e58cd0 Android plugin registry (#9715) 2017-05-09 11:43:19 +02:00
Michael Goderbauer ca4d7211b0 Enforce valid package names on flutter create (#9854)
* Enforce valid package names on flutter create

Fixes #9564

* refactor

* fix other tests
2017-05-08 14:08:59 -07:00
Yegor fa47c34f76 fix version stamp Map check (#9890) 2017-05-08 12:59:33 -07:00
Todd Volkert a29585298e Add level field to the "showMessage" daemon event. (#9889)
Spawned from a discussion in https://github.com/flutter/flutter-intellij/pull/1003
2017-05-08 11:49:47 -07:00
xster 31b958378a Report flutter doctor success/failure (#9664)
* record doctor failures

* fully mock out analytics dependencies
2017-05-08 11:10:36 -07:00
xster c74225e00d Report timing on failed executions too (#9661)
* handle errors

* review notes
2017-05-08 11:10:21 -07:00
Michael Goderbauer 6337a0553c Don't crash on flutter create . on Windows (#9850)
* Don't crash on `flutter create .`

Fixes #9828

* review comments
2017-05-05 15:47:13 -07:00
Todd Volkert 2841497344 Support IPv6 in coverage collection (#9841)
Builds on engine fixes to #9813

Also fixes #7366
2017-05-05 11:09:55 -07:00
Jakob Andersen 6b54137a15 Improve Android builds. (#9801)
Eagerly generate local.properties, and always update the flutter.sdk
setting in it, in case FLUTTER_ROOT has changed.

Fixes #8365.
Fixes #9716 - at least the specific issue reported. My Android Studio
still complains about Gradle versions - it ships with v3.2, but requires
v3.3...

Add a 'generate dependencies' task to the Gradle build, which checks if
the snapshot dependencies file exists, and runs an extra build before
the actual FlutterTask if it doesn't. This makes the first build slower,
but sub-sequent builds (without source changes) much faster.

Fixes #9717.
2017-05-05 14:53:51 +02:00
Jason Simmons b7ceed6b9d Handle missing directories in the flutter doctor IntelliJ check (#9812) 2017-05-04 14:48:41 -07:00
xster 837f101056 Let (almost) all flutter create CocoaPods references be dynamically generated later (#9791)
* Remove all initial cocoapod traces from flutter create except Podfile

* Make updateXcodeGeneratedProperties parameters named

* review notes
2017-05-04 12:26:58 -07:00
Ian Hickson e504dabdd2 Minor style tweaks (#9766) 2017-05-04 10:28:17 -07:00
Todd Volkert ba4bba7498 Support IPv6 in test platform (#9795) 2017-05-03 22:50:24 -07:00
Todd Volkert 6a4b08bec6 Make DeviceDomain echo a msg if doctor says it can't list anything (#9749)
This message will be picked up by IntelliJ and shown to the user in a toast.
2017-05-03 16:12:08 -07:00
xster b8b6a14d8b Make a few error messages bold (#9774) 2017-05-03 16:01:04 -07:00
Todd Volkert 3b5b46b07c Revert "Switch test platform to use IPv6 (#9775)" (#9779)
This reverts commit 9f5fa31ebd.
2017-05-03 14:46:28 -07:00
Todd Volkert 9f5fa31ebd Switch test platform to use IPv6 (#9775) 2017-05-03 14:33:38 -07:00
xster 2051669ac7 CocoaPods flow step 2 - don't pod install unless project has plugins (#9741)
* Revert "Revert "Don't try to resolve CocoaPods unless project has plugins" (#9719)"

This reverts commit f739e9e022.

* Remove channels integration test’s partial cocoapods artifacts
2017-05-03 11:19:59 -07:00
xster 87d0010adb Let printError be able to print bold also (#9714)
* Let printError print bold as well

* review notes
2017-05-02 22:20:14 -07:00
Todd Volkert 31000ef77e Remove unused code in adb.dart (#9732) 2017-05-02 21:12:28 -07:00
xster 85b2b86939 CocoaPods flow step 3 - don't automatically pod setup (#9703)
* Don’t automatically pod setup if the user never did it

* fix/add test

* rename getters
2017-05-02 16:11:37 -07:00
Devon Carew 7fb6646c96 fix an issue with reloading when paused at a breakpoint (#9733)
* fix an issues with reloading when paused at a breakpoint

* update docs
2017-05-02 16:09:57 -07:00
Michael Goderbauer c256e6d557 Populate PUB_ENVIRONMENT for initial pub get and correctly detect APPVEYOR as bot (#9725)
* Populate PUB_ENVIRONMENT for initial pub get

* review comments

* change order
2017-05-02 11:25:59 -07:00
Devon Carew 6957eabe2c tweak the doctor check for host compatibility (#9720) 2017-05-02 10:32:00 -07:00
Ian Hickson f739e9e022 Revert "Don't try to resolve CocoaPods unless project has plugins" (#9719)
* Revert "Document ScrollController (#9705)"

This reverts commit ff8609f273.

* Revert "Fix channels integration test (#9713)"

This reverts commit aace622d3f.

* Revert "Fix flutter view project's automated tests (#9712)"

This reverts commit 1a4bf9b66d.

* Revert "Update hello_world_memory_test package name (#9704)"

This reverts commit ffa8483f3b.

* Revert "Increment the flutter package version (#9699)"

This reverts commit 3b237a8c62.

* Revert "Don’t pod unless there are plugins (#9701)"

This reverts commit 732f79eed7.
2017-05-02 08:57:05 -07:00
xster 732f79eed7 Don’t pod unless there are plugins (#9701) 2017-05-01 13:37:45 -07:00
xster 9a61b8713c CocoaPods flow step 1 (#9687)
* Add cocoapods reason

* s/native/iOS
2017-05-01 12:47:25 -07:00
Todd Volkert 9c1aba2abe Skip adb server restarts during device discovery (#9693) 2017-05-01 10:10:16 -07:00
Devon Carew 6716904385 return the result from calling a service extension (#9636) 2017-04-28 07:39:14 -07:00
xster 66ed8de745 Record flutter run success/fail, build mode, platform, start time in analytics (#9597)
FlutterCommand.runCommand subclasses can optionally return a FlutterCommandResult which is used to append additional analytics. 

Fix flutter run timing report and add a bunch of dimensional data
2017-04-27 15:28:15 -07:00
Michael Goderbauer b432af51fd Don't crash when ADB exits with non-zero exit code (#9653) 2017-04-27 14:57:56 -07:00
Todd Volkert ffdca6f7e8 Fix getDevicesById() (#9646)
If the user specified a non-exact device id, it was producing
an exception whereby we were trying to listen to the
`getAllConnectedDevies()` stream twice.
2017-04-27 13:12:59 -07:00
Devon Carew 9ac2e44ee7 add a regression test for daemon device notification (#9618)
* add a regression test for daemon device notification

* revert event send simplification
2017-04-27 09:30:47 -07:00
Zachary Anderson 0770c3c14f [flutter_tools] Adds some support for '-d all' (#9585) 2017-04-26 21:49:38 -07:00
Todd Volkert e2cd78358f Fix missing await (#9617)
Fixes #9612
2017-04-26 13:14:31 -07:00
Michael Goderbauer 460561bad8 Make Flutter plugins usable from a Windows host (#9599)
Note: In a cross-platform context `Uri.path` is not a valid file path. Allways use `fs.path.fromUri` to convert.
2017-04-26 10:02:22 -07:00
Todd Volkert aaaae265ae Run async when calling adb shell getprop (#9611)
Also, add a timeout so a hung `adb` will not cause the
tools process to hang.

Fixes #9567
2017-04-26 09:58:20 -07:00
Todd Volkert 21f57a85e8 Wait for stderr in runCommandAndStreamOutput() (#9598) 2017-04-25 17:40:28 -07:00
Todd Volkert 60c5ffc1a9 Switch many Device methods to be async (#9587)
`adb` can sometimes hang, which will in turn hang the Dart isolate if
we're using `Process.runSync()`. This changes many of the `Device` methods
to return `Future<T>` in order to allow them to use the async process
methods. A future change will add timeouts to the associated calls so
that we can properly alert the user to the hung `adb` process.

This is work towards #7102, #9567
2017-04-25 17:23:00 -07:00
Michael Goderbauer ad1c497c03 Do not lower-case paths during canonicalization. (#9571)
* Do not lower-case paths during canonicalization.

This breaks hot reload on some platfroms with case insensitive file systems.

* Add unit tests
2017-04-25 10:34:43 -07:00
Alexandre Ardhuin 31828609dc add @required (#9579) 2017-04-25 08:59:43 +02:00
Zachary Anderson 9b250cb6e8 [fuchsia_reload] More information from --list (#9503) 2017-04-20 15:06:56 -07:00
John McCutchan 03d684be6d Fix a race in runFromSource. (#9495)
There is a race where we could complete a future based on a stream event
and then before we cancel the stream subscription, we get another event
and try and complete the future again.
2017-04-20 10:05:30 -07:00
Devon Carew f29dd4f921 improve progress display when running apps; speed up startup (#9475)
* improve progress display when running apps; speed up startup

* review comments
2017-04-20 07:13:35 -07:00
Adam Barth ab1aa07e8f Update engine (#9484) 2017-04-19 15:42:02 -07:00
Devon Carew a97060e095 don't pass in --no-packages-dir (#9476) 2017-04-19 15:26:24 -07:00
John McCutchan 367e11a4a8 Handle reassemble timeouts gracefully. (#9467)
- [x] Switch the reassemble timeout to 5 seconds.
- [x] Print a status message if reassemble fails:

```
Performing hot reload...
Reassembling app.flx$main took too long. Hot reload may have failed.
Reloaded 0 of 418 libraries in 5,322ms.
```

Fixes #9316
Fixes #8861
Fixes #8857
Fixes #8856
2017-04-19 09:30:14 -07:00
John McCutchan 71d80fbd3f Fix hot reload / restart after the back button dismisses the app on Android (#9455)
- [x] Refresh FlutterViews before issuing a hot reload / restart

Fixes #7248
2017-04-18 14:18:33 -07:00
Devon Carew 4631717f1b De-duplicate the dartanalyzer command output (#9441) 2017-04-18 14:02:06 -07:00
John McCutchan 2cf50ce574 Fix hot restart when application is being debugged (#9450)
- [x] Resume the isolate before performing a hot restart.

Fixes #8923
2017-04-18 13:27:53 -07:00
Michael Goderbauer 9a05e984d8 Ask users to set ANDROID_HOME if SDK is installed in a non-standard location (#9445) 2017-04-18 11:56:09 -07:00
John McCutchan acd75c0a3b Improve flutter_tools handling of the device being unplugged while syncing DevFS (#9431)
- [x] Catch SocketErrors and handle them gracefully.
- [x] Print 'Lost connection to device' when the service protocol connection is severed unexpectedly.
- [x] Print 'Application finished' when the application exits otherwise.

After this PR:

```
Launching lib/main.dart on Nexus 7 in debug mode...
Running 'gradle assembleDebug'...                     1.2s
Built build/app/outputs/apk/app-debug.apk (21.7MB).
Syncing files to device...
Application finished.
DevFS sync failed. Lost connection to device: SocketException: OS Error: Connection refused, errno = 111, address = 127.0.0.1, port = 53062
Could not perform initial file synchronization.
```

Fixes #6705
2017-04-17 15:35:01 -07:00
Zachary Anderson b645e4ea3c [fuchsia_reload] Fix command line argument checking (#9434) 2017-04-17 15:21:12 -07:00
John McCutchan 2c1bb355dd Do less file system crawling when we have the Dart dependency set (#9424)
- [x] Skip scanning the file system if we already have the Dart dependency set.

Fixes #9376

```
Performing hot reload...
Reloaded 1 of 418 libraries in 888ms.

Performing hot reload...
Reloaded 1 of 418 libraries in 871ms.

** UNTAR dragontail under project root **
Performing hot reload...
Reloaded 0 of 418 libraries in 443ms.

** UNTAR dragontail under lib/ **
Performing hot reload...
Reloaded 0 of 418 libraries in 385ms.
```
2017-04-17 11:20:04 -07:00
John McCutchan 5e73133797 Use a different message on the first reload. (#9418)
The first hot reload does a bunch of work that we used to hide behind the
loader screen. This PR changes the messsage printed to the user on the first
reload from:

'Performing hot reload...'

to:

'Initializing hot reload...'

Subsequent reloads say 'Performing hot reload...'
2017-04-17 11:03:43 -07:00
Brian Slesinsky cc3b91479c flutter create: don't use relative paths in IDEA config files (#9414)
When invoked from the command line, relative paths aren't typically
used, but they are when invoked from within IDEA and prevents
IDEA from reading the files.

Also, remove flutterPackagesDirectory since it's not used
2017-04-16 13:58:08 -07:00
Zachary Anderson a0369806f2 [fuchsia_reload] Give more information in the module list (#9400) 2017-04-14 21:18:48 -07:00
Zachary Anderson 9fdd4f4701 [fuchsia_reload] Reload each instance of a module. (#9379) 2017-04-14 11:33:47 -07:00
Brian Slesinsky 5cb9097965 flutter create: enable Java support in IDEA (#9335)
Generates an android.iml file and a package-level library for flutter.jar.

Does not set up an Android SDK in IDEA; this isn't possible with a
template-based approach. But IDEA shows a clear warning, so the
user can fix this by setting the SDK.

(When creating a Flutter project from within IDEA, we can fix this up
afterwards in the plugin.)
2017-04-14 10:12:48 -07:00
Jason Simmons 9455fb64d9 Allow upgrades and version checks against the alpha branch (#9387)
Fixes https://github.com/flutter/flutter/issues/9258
2017-04-14 09:58:31 -07:00
Jason Simmons 76bebeed9d Instruct users to run Android Studio so it will install Android SDK components (#9323)
Fixes https://github.com/flutter/flutter/issues/8690
2017-04-13 11:28:18 -07:00
Ian Hickson 2a54524337 Fix tests to use Ahem, and helpful changes around that (#9332)
* Fix tests to use Ahem, and helpful changes around that

- Fix fonts that had metric-specific behaviours.

- LiveTestWidgetsFlutterBinding.allowAllFrames has been renamed
  to LiveTestWidgetsFlutterBinding.framePolicy.

- LiveTestWidgetsFlutterBinding now defaults to using a frame policy
  that pumps slightly more frames, to animate the pointer crosshairs.

- Added "flutter run --use-test-fonts" to enable Ahem on devices.

- Changed how idle() works to be more effective in live mode.

- Display the test name in live mode (unless ahem fonts are enabled).

- Added a toString to TextSelectionPoint.

- Style nit fixes.

* Roll engine to get Ahem changes.

* Update tests for dartdoc changes.

* Fix flutter_tools tests
2017-04-12 13:33:02 -07:00
Devon Carew 20e83e3e58 change the reload success message to include both the elapsed time and the library count (#9328) 2017-04-11 07:57:18 -07:00
Yegor a5593b1678 fix analyzer warning: use const where possible (#9320) 2017-04-10 14:20:47 -07:00
Yegor 5efbe05f04 do not warn about out-of-date Flutter installation too often (#9271)
* do not warn about out-of-date Flutter installation too often

* style fix
2017-04-10 13:21:02 -07:00
Jakob Andersen 7ffa82aaf0 Inject plugin registration. (#9216)
Added a PluginRegistry to the new project template. The registry files will be automatically updated at build time to register the native plugins.

Fixes #7814.
2017-04-10 15:44:19 +02:00
Devon Carew 70e2acfb6c tweak the layout for the ios doctor checks (#9306) 2017-04-09 12:43:48 -07:00
Devon Carew ca5f0c9a3e fix the return type on flutterPlatformOverride (#9269) 2017-04-09 11:08:32 -07:00
Alexandre Ardhuin 610955f81d upgrade to linter-0.1.30 (#9297)
* upgrade to linter-0.1.30

* add prefer_is_empty lint
* add directives_ordering lint
* add no_adjacent_strings_in_list lint
* add no_duplicate_case_values lint
* add prefer_collection_literals lint
* add prefer_const_constructors lint
* add prefer_contains lint
* add prefer_initializing_formals lint
* add unnecessary_null_aware_assignments lint
* add unnecessary_null_in_if_null_operators lint
2017-04-08 08:43:19 +02:00
Yegor 361afef305 fix checkLockAcquired: support re-entrant locking (#9272)
* fix checkLockAcquired: support re-entrant locking

* add test; address comments

* add comment
2017-04-07 21:08:53 -07:00
Jason Simmons 8ee6525cc8 Remove the obsolete build apk --target-arch flag (#9239)
Gradle APK builds include engine binaries for all applicable architectures
2017-04-07 13:48:10 -07:00
Jason Simmons 67b3871e2a Filter Android logs by the pid of the remote process (#9293)
Fixes https://github.com/flutter/flutter/issues/6849
2017-04-07 13:41:29 -07:00
Alexandre Ardhuin 8bcf302e23 use conditional assignment (#9252) 2017-04-07 21:41:17 +02:00
Ian Hickson 3eb87830e9 Constants! Constants everywhere! (#9286)
Aggressively apply the const lint.
2017-04-07 12:24:32 -07:00
Ian Hickson 6d5488ad3e Minor fixes to flutter packages. (#9278) 2017-04-07 12:23:57 -07:00
Ryan Macnak 249bbac362 Support for placing an AOT dylib in the flx. Part of Fuchsia AOT sup… (#9240)
Support for placing an AOT dylib in the flx.  Part of Fuchsia AOT support.
2017-04-06 11:12:12 -07:00
Michael Goderbauer a559b8df5c [Regression] Re-enable ANSI color support on Windows (#9232)
Also adds a test to make sure we don't break it again.
2017-04-05 15:44:22 -07:00
Ian Hickson a52c7b470d Update the examples/ README and associated fixes. (#9090)
This yak shave went as follows:

Fix https://github.com/flutter/flutter/issues/8795 by adding stocks to
the examples README.

Notice the layers entry in that README isn't quite right either.
Update that.

Check the layers/README file is worth pointing at.

Update the layers/README.

Let's run some of the layer tests to see if they still work.

Oops, need to update them to gradle.

Ok let's try running them again.

Oops, sector is broken.

Add a test for sector.

Fix sector. Find you need to add an assert to a const constructor.

Notice we need to turn const asserts on for the analyzer.

Notice the analysis_options files are out of sync with each other and
with the full list of lints.

Turn on the lints that should be on.

Fix the bugs that finds.
2017-04-05 11:28:33 -07:00
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
Dwayne Slater eb9046b175 [Flutter Tool] Only uninstall Android app when the initial install fails (#8930)
Uninstalling the app removes the data and cache directories, so this
allows application data to persist across multiple flutter run
invocations.

This also handles the edge case where the app fails to install due to an
error in installation (e.g. debug keystore changes, switching from a
release keystore to a debug keystore, etc.).
2017-04-04 10:16:42 -07:00
Todd Volkert dbc447b19a Only complete the web socket future once (#9176) 2017-04-04 10:15:48 -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 91dbb3c91e roll engine and update tools for the removal of dart:jni (#9137) 2017-03-31 16:20:14 -07:00
Chris Bracken a54979e1fe iOS: fail build wth error if Python six missing (#9135)
Xcode builds depend on the Python 'six' module. If not present, exit
immediately with a useful error message.

The six module is included in the system default Python installation. We
perform this check in case a custom Python install has higher priority
on $PATH; e.g., due to a Homebrew or MacPorts installation.

This extracts an existing doctor check to use it during the build step
as well.
2017-03-31 14:40:22 -07:00
Alexandre Ardhuin 2de61a0853 add @required when there's an assert not null (#9124)
* add @required when there's an assert not null

* address review comments
2017-03-31 18:34:13 +02:00
John McCutchan 0ee7fabe9a Improve verbose trace output (#9104)
Related #8876
2017-03-30 10:03:42 -07:00
Jakob Andersen f34f8a3197 Add template for plugin projects. (#9076)
Plugin projects are created by running `flutter create --plugin <name>`.

An example app is also created in the plugin project, using the normal 'create' template, which has been modified to allow for conditional plugin code.

Modified the android package name to match package naming conventions (all lower-case, and must match the directory name).
2017-03-30 12:39:21 +02:00
Jason Simmons e7f1361681 Update artifact names and remove obsolete artifacts (#9091) 2017-03-29 16:30:41 -07:00
Yegor e067041279 increase vmservice timeout; log stderr in microbenchmarks (#9088) 2017-03-29 15:40:17 -07:00
Jason Simmons 72effdd27c Roll the engine and update for new binary names (#9089) 2017-03-29 15:31:36 -07:00
Alexandre Ardhuin 4c530d5e8c prefer_final_fields (#8967) 2017-03-29 21:21:46 +02:00
John McCutchan 7483bc153d Stop handling signals and terminal input separately (#9057)
Fixes #7307
2017-03-29 06:46:27 -07:00
Ian Hickson 0b566b3850 Improve output of flutter doctor on iOS (#8959) 2017-03-28 17:16:37 -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
Phil Quitslund ab6df3af40 Bump to Dart SDK 1.23.0-dev.10 (#9051)
* Bump to Dart SDK 1.23.0-dev.10

* allows us to understand flutter usage via telemetry
* brings in `@immutable`

Fixes: #9042

* completer fix

* Update to platform 1.1.1.
2017-03-28 14:53:03 -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
Jakob Andersen eedc5d9f58 Make pod install a long-running step. (#8999)
The very first time `pod install` is invoked, CocoaPods downloads the master spec repository, which takes quite a while. Before this change, the build appeared to have stalled. With this change, at least the spinner is moving.

Added `pod setup` to the install instructions for CocoaPods, so the spec repo is downloaded while setting up Flutter, instead of during the first build.
2017-03-27 09:30:36 +02:00
Michael Goderbauer 06144a7207 Fix crash when old Android Studio (<2.2.0) is installed (#9009)
Old Android Stuio versions pior to 2.2.0 didn't come with Java bundled. Make sure flutter doesn't crash when we try to determine the Java version of those old Android Studio installations.
2017-03-24 17:07:08 -07:00
Chris Bracken 25999678fd Use const for string literals where possible (#8980) 2017-03-23 11:41:03 -07:00
xster 3bc3d4a50b Remove various roboto font logic (#8350) 2017-03-23 11:28:03 -07:00
Michael Goderbauer 41edc1ac74 Use Java bundled with Android Studio for gradle (#8965)
* Use Java bundled with Android Studio for gradle

* review comments
2017-03-23 10:17:24 -07:00