Commit graph

1454 commits

Author SHA1 Message Date
Zachary Anderson b6ba37d768 Adds initial support for hot reload for Fuchsia to flutter_tool. (#8764) 2017-03-14 11:12:19 -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
Jason Simmons e44f513e43 Fix the gen_snapshot path for a local_engine FLX build in debug mode (#8754)
gen_snapshot is now used for both JIT and AOT snapshots.  The JIT version
used in debug mode will be a 64-bit binary.
2017-03-14 10:17:59 -07:00
John McCutchan 2148e9aff6 Improvements to flutter doctor JDK search. (#8745)
- [x] Add custom logic on MacOS to determine if Java is installed before invoking `java`.
- [x] Check JAVA_HOME, platform specific logic, and finally PATH to locate the `java` executable.
- [x] Improved doctor messages.

Fixes #8508
Fixes #8521
2017-03-14 09:57:34 -07:00
Jakob Andersen 9c6ffc8281 Use snapshot's .d file as source inputs in Gradle build. (#8756)
* Use snapshot's .d file as source inputs in Gradle build.

If we don't yet have a .d file (first build), fall back to using the
.dart files in the current directory. This enables us to detect changes
in dependent source files (Flutter framework, packages outside the
source directory, etc.), and re-generate the snapshots as needed.

Unfortunately, Gradle requires knowing the source files before executing
the task, and can't update them after building, so Gradle considers the
second build to be out-of-date (because it has more input files than the
first build). Sub-sequent builds have the correct dependency
information, and will be skipped if the source files haven't changed.

Also added a dependency on gen_snapshot. The snapshot ABI isn't stable,
so we need to re-generate the snapshots when we roll the Dart SDK
dependency.

Fixes #8315
Fixes #8687
Fixes #8607
2017-03-14 12:49:30 +01: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
Dan Rubel b10e60bc15 do not forward errors if stream is closed (#8739) 2017-03-13 15:07:13 -04:00
John McCutchan 31dc3c4722 Try all possible Android SDK locations before giving up (#8730)
Fixes #8618
2017-03-13 11:21:34 -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
Yegor 9f020d6104 upgrade package:http so we no longer need custom MultipartRequest (#8715) 2017-03-10 11:05:06 -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
Jakob Andersen 60c0c3d323 Revert "Eliminate CocoaPods install step (#8694)" (#8705)
* Revert "Eliminate CocoaPods install step (#8694)"

This reverts commit f4a13bc72b.

If the developer is relying on CocoaPods and hasn't done a pod install, we will do it for them. This is needed for a smooth native plugin experience, similar to what Gradle is doing on the Android side.

There's no hard dependency on CocoaPods. We only run pod install if the project uses CocoaPods, so developers are still free to use alternatives if they prefer (and if they don't want to use native plugins).

Fixes #8685
Fixes #8657
Fixes #8526

* Require CocoaPods 1.0.0 or newer.

And make sure we don't get a crash if running `pod install` fails.

* Address review feedback
2017-03-10 13:43:57 +01:00
Alexandre Ardhuin c22812e0ea Flutter style guide: Prefer naming the argument to a setter 'value' (#8691) 2017-03-10 09:00:29 +01:00
Chris Bracken 7b9cefb3be Add brew update step before install/upgrade (#8703)
This avoids unintentionally installing an older version if the
developer's homebrew installation is out-of-date.
2017-03-09 20:45:40 -08:00
Chris Bracken 1bb0d7728e Eliminate brew tap flutter/flutter instruction (#8702)
The flutter tap was deleted as part of the resolution to #7783.
2017-03-09 18:26:38 -08:00
Chris Bracken f4a13bc72b Eliminate CocoaPods install step (#8694)
If the developer is relying on CocoaPods and hasn't done a pod install,
they'll get a build failure indicating the issue.

This also avoids a hard dependency on CocoaPods in the tool and allows
developers to customize their Xcode steps to use alternatives such as
Carthage if they prefer.
2017-03-09 17:57:45 -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
Michael Goderbauer edbfb17b62 remove remaining references to sky_snapshot (#8665) 2017-03-09 11:40:59 -08:00
Chris Bracken cabd58dbb2 Correct instructions for libimobiledevice install (#8675)
As of the latest Xcode versions, the latest published libimobiledevice
is out-of-date and build from HEAD is required.

This fixes two bugs:
1. Update initial install instructions to add --HEAD flag.
2. Update uninstall, reinstall instructions to include
   --ignore-dependencies flag, since other brew formulae depend on
   libimobiledevice.
2017-03-08 21:24:00 -08:00
Chris Bracken bf6b6e188d Check for CocoaPods installation if required (#8666) 2017-03-08 16:42:31 -08:00
Chris Bracken 2bbdacce35 Improve ideviceinstaller error message (#8662)
Homebrew is an expected part of the iOS toolchain. Update the error
message to assume that.
2017-03-08 15:31:32 -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 329e52c02c apply upcoming rule use_collection_literals_when_possible (#8649) 2017-03-08 14:57:31 -08:00
Michael Goderbauer 906103dd10 eliminate sky snapshot (#8631)
* eliminate sky snapshot

* roll engine
2017-03-08 13:33:06 -08:00
Chris Bracken eb14385297 Update CocoaPods install instructions to use Homebrew (#8644)
This is consistent with the rest of the iOS toolchain.
2017-03-07 21:52:40 -08:00
Jakob Andersen a4883de38f Run 'pod install' before building iOS app. (#8609)
Since iOS builds are CocoaPods enabled by default, we should make sure to run `pod install` to get pods wired up before building the app.

Also added a check to `flutter doctor` to verify CocoaPods is installed.

I'm passing FLUTTER_FRAMEWORK_DIR to the `pod install` command, so we can have the app's Podfile link in Flutter.framework as a pod instead of having to copy it over in xcode_backend.sh.
2017-03-07 20:34:38 -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 902ffa1262 Set Cache.flutterRoot after replay environment is set up. (#8614)
Fixes #8562
2017-03-07 11:19:56 -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 aac8762a7a Properly handle ProcessExit being thrown when exit() is called (#8592) 2017-03-06 13:23:03 -08:00
Todd Volkert 011a9026e4 Create and use a STILL_RECORDING shutdown stage (#8588) 2017-03-06 12:02:24 -08:00
Todd Volkert b7f00a643d Defensively handle case of VMservice message that has no id. (#8587) 2017-03-06 11:40:14 -08:00
Michael Goderbauer d5b502bbc2 use new --print-deps option (#8577) 2017-03-06 10:55:32 -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 bb1dea7440 change messaging around Windows (#8549) 2017-03-02 20:06:23 -08:00
Michael Goderbauer e4f586d239 Enable Hot Restart on Windows (#8548) 2017-03-02 20:05:47 -08:00
Michael Goderbauer ae1a719e03 fix FLUTTER_ANSI_TERMINAL check (#8544)
* fix FLUTTER_ANSI_TERMINAL check

should have been included in the previous PR :(

* review comments
2017-03-02 16:25:33 -08:00
Michael Goderbauer 1f7b8ae11f Enable ANSI codes in PowerShell (#8537) 2017-03-02 13:09:36 -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
Jakob Andersen c9644a49f2 Read package ID and activity name from .apk for Gradle-based builds. (#8452)
The gradle build scripts can be configured to output different
application IDs for different build types, so we need to examine the
built .apk to figure out the name of the package and activity.

Re-landing this change, updated to only get information from the .apk
if it exists.

Since the tools create an AndroidApk instance early, even before we've
actually built an .apk, we have to create a new instance after building,
so we can start the right app/activity.

Fixes #8327.
2017-03-02 09:21:40 +01:00
Alexandre Ardhuin 69b6bb87d1 prefer_is_empty and prefer_is_not_empty (#8474) 2017-03-01 22:17:30 -08:00
Michael Goderbauer 99ca38e988 make use of Dart's new capability to print Unicode on Windows (#8505) 2017-03-01 13:15:48 -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
Jakob Andersen 41d81132f9 Don't print stacktraces from ToolExit errors during flutter run. (#8453)
Instead, actually exit the tool.

Fixes #8363.
2017-03-01 13:15:31 +01: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
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
Michael Thomsen 601b800325 Add solution to gradle-dir doctor warning (#8458)
* Add solution to gradle-dir doctor warning

* Review feedback + properly format strings
2017-02-28 16:01:23 +01:00
Jakob Andersen 81a7fb48dd Catch file system exception while looking for Android Studio on macOS. (#8457)
Fixes #8395.
2017-02-28 15:57:47 +01:00
Todd Volkert 0324923119 Add courtesy notice about bug reports containing sensitive info (#8447) 2017-02-28 06:54:04 -08:00
Devon Carew e85d3792f0 fix a doctor check for webstorm (#8450)
* fix a doctor check for webstorm

* fix a missing reference
2017-02-28 06:27:30 -08:00
Michael Goderbauer 9a9a3ffd11 Fix flutter logs on Windows (#8442) 2017-02-27 18:01:21 -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
Devon Carew adf3b90df2 check installed IDES for webstorm (#8422) 2017-02-27 07:53:41 -08:00
Chris Bracken 6b97757b6d Ensure packages up-to-date on iOS build (#8412)
iOS builds rely on package dependencies and associated build artifacts
(pubspec.lock, .packages files) to be up-to-date.
2017-02-24 17:47:29 -08:00
Adam Barth a1d36f6892 Revert "Read package ID and activity name from .apk for Gradle-based builds." (#8400) 2017-02-24 11:23:14 -08:00
Jakob Andersen a0c3aae16d Read package ID and activity name from .apk for Gradle-based builds. (#8393)
The gradle build scripts can be configured to output different
application IDs for different build types, so we need to examine the
built .apk to figure out the name of the package and activity.

Fixes #8327
2017-02-24 16:30:59 +01: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
Michael Goderbauer 718859ad8d Partially revert #8332 (#8386)
The JDK doesn't put `javac` in the PATH on Windows :(
2017-02-23 17:35:20 -08:00
Alexandre Ardhuin 8c043d06de fix lints for directives_ordering rule (#8382) 2017-02-23 13:37:26 -08:00
xster 2b61e21b29 Change doc references from .xcodeproj to xcworkspace (#8379) 2017-02-23 12:40:23 -08:00
Todd Volkert a68c979b73 Add ability to record & replay VMService connection (#8355) 2017-02-23 10:05:00 -08:00
Jakob Andersen 6d66be17b9 Add support for target file in Gradle builds. (#8364)
If a target file is specified on the flutter tools command line, pass it
through to Gradle.

It is still possible to statically specify a target file in the flutter
section of build.gradle, but it is now possible to specify it on the
command line as well. The command line option takes precedence.

Fixes #8175.
2017-02-23 15:09:05 +01:00
Jakob Andersen 13d7770cf9 Fix local engine support for Gradle builds. (#8362)
Fixes #6761.
2017-02-23 14:56:19 +01:00
Devon Carew fa04321604 filter an ios simulator assert (#8357) 2017-02-22 20:55:08 -08:00
Michael Goderbauer 28a2b99989 only request sky_snapshot if it is actually needed (#8340) 2017-02-22 13:55:58 -08:00
Michael Goderbauer 99ae5a897e Add line about Java version back to flutter doctor (#8332)
Line was accidentally removed by #8320

Also, change the version check from `java` to `javac` since we need the JDK and not just the JRE.
2017-02-22 13:01:53 -08:00
Jakob Andersen a745fd58be Don't reinstall the app if the latest build is already installed. (#8328)
Only implemented for Android devices for now. Compare the installed SHA1
to the latest build. If they match, there's no reason to reinstall the
build.

Fixes #8295
2017-02-22 14:35:49 +01: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 7db8241a6d Revert "Revert "Replace jarsigner with apksigner" (#8164)" (#8320)
This reverts commit 70d7fe3a0d.

The Java version missmatch on the bots has been resolved.
2017-02-21 16:26:30 -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
Chris Bracken 58898636cc Only attempt to deploy to USB-connected iOS devices (#8309)
Do not attempt to deploy/debug wifi connected iOS devices. ios-deploy is
able to install over wifi, but we've had several bugs reporting failure
to run/debug once installation has completed when the device is also
connected via USB. Note that we don't currently support deploy/debug
over wifi since libimobiledevice (which is also required) requires a USB
connection.
2017-02-21 13:02:50 -08:00
Jakob Andersen 421258baea Remove SHA1 check from AndroidDevice.isAppInstalled() (#8290)
* Remove SHA1 check from AndroidDevice.isAppInstalled()

The docs for isAppInstalled say 'check if a version of the given app is
already installed', however the current code returns true only if it's
the latest build that's installed.

This made sense in the past, when the use pattern was:

  if (!isAppInstalled(...)) installApp(...);

but now the usage is:

  if (isAppInstalled(...)) uninstallApp(...);
  installApp(...);

This has the probably unintended consequence that if you run `flutter
install` or `flutter run` two times in a row with no source changes, the
second invocation will uninstall the app, but the first invocation might
not.

Removing the SHA1 check makes us always uninstall the app if it's
installed.

Fixes #8172
2017-02-21 10:18:12 +01:00
Alexandre Ardhuin 2888139c6b prefer const constructor (#8292) 2017-02-20 14:07:16 -08:00
Jakob Andersen 8b820ccc54 One more fix for finding Android Studio on macOS. (#8288)
Finally found the command to run tests in checked mode on my system. This one should've been caught by the IDE, but wasn't.
2017-02-20 14:27:03 +01:00
Jakob Andersen 0f3cc6e943 Fix finding Android Studio on macOS. (#8287) 2017-02-20 13:19:22 +01: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
Ian Hickson f9c2d7d9aa Introduce a quick way to test across platforms (#8262) 2017-02-17 17:47:49 -08:00
Michael Goderbauer e2ff674f31 add windows binaries to allPlatforms (#8250) 2017-02-17 13:40:56 -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
Todd Volkert b59982eccd Properly await future when starting app in daemon mode (#8227)
Fixes #8209
2017-02-16 16:46:38 -08:00
Ryan Macnak 9ec5330f32 Roll engine to ab0953092743319e0dde3a0c8f582d261c232964. (#8223)
Update stack_trace_test.dart for changes to the naming of async body functions.
2017-02-16 16:13:17 -08:00
Michael Goderbauer e9af570f1f Enable Gradle Workflow on Windows (#8201)
* Enable Gradle Workflow on Windows

With this the app created by `flutter create` now compiles on Windows.

* Move OS check to gradle file
2017-02-16 14:17:09 -08:00
Jakob Andersen 83b9142468 Fix getMissingPackageHintForPlatform for Gradle-based projects. (#8214) 2017-02-16 13:37:53 -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
Ian Hickson 03ae2cf366 Catch crashes during or before coverage collection. (#8207)
This assumes a fix to https://github.com/dart-lang/test/issues/542

The timeout added in this patch is a workaround for https://github.com/dart-lang/coverage/issues/165
2017-02-15 18:50:19 -08:00
Dan Rubel 7138541d23 new --kernel option for flutter run to use precompiled kernel code (#8191) 2017-02-15 17:37:00 -05:00
Michael Goderbauer 071efec271 Implements WindowsStdoutLogger (#8189)
Replaces unprintable characters with alternative symbols.
2017-02-15 13:20:17 -08:00
Chris Bracken 0dd89fa994 Improve doctor message when xcode-select invocation required (#8179)
If a developer has installed the Xcode command-line tools, then later
installs Xcode, they may need to run xcode-select to update the path of
the command-line tools to that of the new installation.
2017-02-15 10:13:38 -08:00
Todd Volkert d6f61b9ece Add ability to mock VMService's WebSocket connection (#8145) 2017-02-15 06:52:28 -08:00
Michael Goderbauer 70d7fe3a0d Revert "Replace jarsigner with apksigner" (#8164) 2017-02-14 18:02:33 -08:00
Michael Goderbauer b38a6cbbba Replace jarsigner with apksigner (#8154) 2017-02-14 17:11:24 -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
Todd Volkert f903a1c841 Add retry writing to DevFS. (#8142)
This is a workaround to #8141
2017-02-14 09:59:43 -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
Jakob Andersen cd3fd475d8 Don't update Android SDK settings in build.gradle (#8089) 2017-02-14 13:48:14 +00:00
Michael Goderbauer 5e54fd54d9 Ban package:path from Flutter Tools (#8119) 2017-02-13 17:45:50 -08:00
Yegor d4550fd498 do not build APK twice (#8105) 2017-02-13 14:55:35 -08:00
Todd Volkert 9c05c345c7 Enable record/replay of file system activity and platform metadata (#8104) 2017-02-13 13:59:29 -08:00
Dan Rubel ea74e07689 move flutter user analysis options file (#8091)
* move flutter user analysis options file
* add comments referencing each of the analysis options files
2017-02-13 16:39:35 -05:00
Todd Volkert 3b52c87da6 Bump deps on package:file and package:process (#8097) 2017-02-13 09:55:54 -08:00
Michael Goderbauer cff7dc5444 Bump package:process version (#8073) 2017-02-10 16:54:51 -08:00
Chris Bracken 67462b4355 Update IntelliJ plugins link (#8068)
Replace version-specific link with a version-independent URL.
2017-02-10 14:21:37 -08:00
Jason Simmons 198d293857 Support some new Dart features in AOT mode (#8067)
See https://github.com/flutter/flutter/issues/7579
2017-02-10 13:14:57 -08:00
Devon Carew 5caeb3ff32 use the intl package (#8060) 2017-02-10 09:36:04 -08:00
Jakob Andersen b246c5e7e9 Make new project template gradle-based for Android. (#7902)
* Make new project template gradle-based for Android.

With this change, the 'new project' template uses the same gradle-based build for Android as the hello_services example. This has some implications on build performance, since we're now building a complete Android app instead of just combining a pre-compiled .dex with the Flutter assets.

The very first build is a little over 2x slower, since it needs to download gradle and build the build scripts before getting to the actual code. Subsequent builds with changes to the code are comparable to the old builds. Null builds are faster. Enabling the gradle daemon speeds up subsequent builds by around 5s.

* Move Flutter Gradle plugin to Flutter root.
2017-02-10 09:37:38 +01:00
Alexandre Ardhuin e151a1a438 prefer_contains (#8040) 2017-02-09 15:17:55 -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
Devon Carew b180caae4a change a few more places to use the seconds display for log output (#7995) 2017-02-08 19:47:12 -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
xster 1cc78145fe Add logger indent option and indent nested xcode command outputs (#7867)
* Add indent option to logger and indent non-flutter nested output

* Add a missed override

* Formatting
2017-02-08 18:27:47 -08:00
Ian Hickson f17e3f45a5 Fix the 'p' command in hot reload. (#7969)
Turns out when I added tests, I broke the actual underlying functionality.
2017-02-08 14:24:25 -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
Chris Bracken 2432b5205b Improve flutter doctor messages for ios-deploy (#7962)
Differentiate between the not-installed and the out-of-date scenario.
2017-02-07 18:52:50 -08:00
Devon Carew f1f53460a4 remove sdk summaries (#7957) 2017-02-07 17:59:10 -08:00
xster 0c8e1813b3 Add a user friendly error message when no development team is selected for physical deployment (#7879) 2017-02-07 16:59:58 -08:00
Devon Carew 27dc043a39 upgrade to the latest usage package (#7917) 2017-02-07 10:01:44 -08:00
Jacob Richman 53fc96da9e Small Flutter strong mode cleanup fixes. (#7825)
* Small Flutter strong mode cleanup fixes.

These are cases where strong mode down cast composite errors
generally indicated cases that would performance or correctness
issues if Flutter code was run in a strong mode VM.

* Fix Command API so that it is always in terms of Map<String,String>.

* Fix typedef
2017-02-06 08:55:09 -08:00
Michael Goderbauer 82f887de07 Fix Flutter Tools Tests to run on Windows (#7878) 2017-02-05 22:58:49 -08:00
Chris Bracken c7054b302b Improved ensureDirectoryExists error message (#7880) 2017-02-03 18:09:07 -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 cce70d7069 Improved error message for iOS device on a non-Mac host (#7859)
And fix some un-grammatical language below.
2017-02-03 12:54: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
Chris Bracken 104fcf8d08 Fix typos, quote consistency (#7856) 2017-02-03 11:50:49 -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
Michael Goderbauer a742a5ddf6 Make flutter analyze run on Windows (#7828) 2017-02-02 15:41:13 -08:00
Jason Simmons d2a1e125e9 Do not print logs whose timestamp is equal to the last timestamp seen (#7827)
If the tool is started immediately after a previous run of the tool, then
the most recent log timestamp may come from the previous run's logs.
The new instance of the tool should not print those logs.

This was happening during runs of the microbenchmark script.
2017-02-02 12:48:53 -08:00
Luke 646d7404cb Fix issues with flutter doctor (#7808)
* fix issue detecting ios-deploy. fix issue matching IntelliJ Ultimate on Mac

* refactor directory navigation code
2017-02-02 00:19:10 -08:00
Ian Hickson 5f38773ed0 Screenshot improvements (#7800)
Add an "s" command to `flutter run` which takes a screenshot.
Make that comment turn off the slow mode banner.
2017-02-01 22:47:53 -08:00
Michael Goderbauer 829976d35e Work around for dart-lang/sdk#28603 (#7805) 2017-02-01 21:06:19 -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
Michael Goderbauer 40aab7f553 Bump Dart SDK to 1.22.0-dev.10.3 (#7791) 2017-02-01 16:33:27 -08:00
Chris Bracken 50125ab271 Use ios-deploy --version for install check (#7797)
ios-deploy -h/--help returns a non-zero exit code.
2017-02-01 16:30:49 -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
Michael Goderbauer 84de5e815d Work around for dart-lang/sdk#28599 (#7786) 2017-02-01 13:39:19 -08:00
Chris Bracken 236e8137b8 Ensure that ios-deploy meets minimum version constraint (#7784)
Also emits the version information in flutter doctor output.

ios-deploy > 1.9.0 is required to deploy to iOS devices.
2017-02-01 12:55:03 -08:00
Jason Simmons 59cacd7102 Some fixes for the microbenchmarks (#7781)
* Return null from VM.mainView if no view exists
* Retry in connectToServiceProtocol if a view is not yet available
* Do not explicitly call exit from the benchmarks - it will not cleanly shut down the engine
2017-02-01 11:54:27 -08:00