Commit graph

451 commits

Author SHA1 Message Date
xster 9a0d4cf75b
Add a Flutter version comparison function (#12959)
* add git version comparison function

* use [] in dartdoc

* Make method instance method
2017-11-14 18:50:15 -08:00
Greg Spencer 7adb720dcc
Fixed a typo that I forgot to push before committing ide-config change. (#12998) 2017-11-13 15:27:16 -08:00
Greg Spencer 797b39e9b2
Creates a new flutter command 'ide-config' and removes *.iml and .idea from tree. (#12958)
Creates a new (hidden) flutter command 'ide-config' that will create and/or update
existing .iml files and some files under the .idea directory, as well as
removing existing *.iml files and the .idea directory.

It also:

 * Adds *.iml to the .gitignore
 * Removes existing .iml files from the repo, and moves them to the
   packages/flutter_tools/ide_templates/intellij directory.
 * Adds a flag to ide-config ('--update-templates') that will take any new .iml
   files in the flutter tree and add them to the existing templates.
     - If --overwrite is also specified, then all existing templates will also
       be overwritten with the contents from the flutter tree, and any that have
       been deleted from the flutter tree will also be removed from the
       templates.
 * Added new run configurations for all existing app targets that will now also
   be automatically added to IntelliJ.
 * Setting up the environment also includes setting the coding style guidelines
   and the git VCS.
 * Note that after this PR lands, Flutter developers will need to run it once to
   re-create the .iml files and configuration files that have been removed.

After this PR lands, .iml files will no longer appear in the untracked files
section for git.
2017-11-13 10:55:22 -08:00
Mehmet Fidanboylu 96942bc797
Get rid of static version methods which ignore the AppContext (#12971)
* Get rid of static version methods which ignore the AppContext

* Review comments

* Review Comments

* Make branch behave the same as original implementation

* Fix tests
2017-11-10 17:31:18 -08:00
xster e94038154b
Print a warning when cocoapods specs repo is out of date (#12915) 2017-11-10 12:41:58 -08:00
Mikkel Nygaard Ravn c936aa8cd4
One more timeout. Centralize definitions. (#12970) 2017-11-10 15:56:17 +01:00
Mikkel Nygaard Ravn e3d5cbc929
Make timeout more robust (#12969) 2017-11-10 13:51:52 +01:00
Mikkel Nygaard Ravn a836201a74
Raise timeout limit for tests that call pub (#12968) 2017-11-10 12:33:34 +01:00
Mikkel Nygaard Ravn 46b2d6462e
Update timeouts for flutter create tests (#12965) 2017-11-10 09:35:11 +01:00
Todd Volkert 454db9d47c
Re-organize flutter_tools code to better support proper layering. (#12957)
* executable.dart#main() depends on runner.dart#run()
* Refactor code such that non-commands don't depend on commands.

No code was actually changed in this PR - code was merely moved from
point A to point B.
2017-11-09 21:45:31 -08:00
Devon Carew b6bd628bcd
address unused element issues and new warnings (#12890)
* address unused element issues and new warnings

* add a missing return
2017-11-08 14:06:55 -08:00
Alexandre Ardhuin 15601fe55c
Enable lint prefer asserts in initializer lists (#12903)
* enable lint prefer_asserts_in_initializer_lists

* enable --assert-initializer
2017-11-08 22:59:49 +01:00
Yegor d4830fcf1b
smoke test VM service connection before returning VMService object (#12914) 2017-11-08 10:43:47 -08:00
xster 8f79643680
Error message for unregistered phone (#12911) 2017-11-07 13:23:43 -08:00
xster c17099f474
Leave a version tag when creating project (#12846)
* Leave a version tag when creating project

* Generalize .version to .metadata
2017-11-03 10:07:57 -07:00
Alexandre Ardhuin 28366002d9 enable lint prefer_foreach (#12674)
* enable lint prefer_foreach

* fix tests
2017-10-25 08:25:44 +02:00
Alexandre Ardhuin 1fce14a31c enable lint prefer_single_quotes (#12665) 2017-10-22 18:11:36 +02:00
Jason Simmons eb475bbb80 move dart_io_entries.txt to third_party/dart for AOT builds with a local engine (#12659) 2017-10-20 15:32:27 -07:00
Alexandre Ardhuin 700dc9f752 enable lint avoid_function_literals_in_foreach_calls (#12607) 2017-10-19 08:16:16 +02:00
stevemessick 2b78675bd8 Update IDEA project files (#12391)
* Generate Android framework config

* Fix templates

* Moar templates fixing

* Minor tweaking
2017-10-05 12:56:49 -07:00
Ian Hickson 89566feeed Run pub with --trace (#12328)
See https://github.com/dart-lang/pub/issues/1714
2017-09-29 17:56:25 -07:00
Ian Hickson e1fa035b69 Retry on failed download. (#12293) 2017-09-28 17:37:34 -07:00
Chris Bracken 283f27d422 Clarify libimobiledevice installation status message (#12303)
Differentiate between 'not installed' and 'not working' and emit a more
targeted message.
2017-09-28 13:04:59 -07:00
Todd Volkert 9ea1ff12d7 Add Flags class. (#12268)
This class lives in the Context and allows callers to "inject"
flag values, where flag values are first extracted from the
command arguments, then from the global arguments as a fallback.
2017-09-28 09:36:55 -07:00
Sarah Zakarias 3cbbbf0617 Allow empty pubspec file when building asset bundle (#12269) 2017-09-26 23:14:20 +02:00
Sarah Zakarias 49ba974710 Factor out flutter manifest logic (#12237) 2017-09-26 14:48:52 +02:00
Todd Volkert a08b5e00af Run command validation on all commands. (#12246)
This makes command validation happen as part of `verifyThenRunCommand()`,
using a newly introduced protected method (`validateCommand()`) rather than
a `commandValidator` property (that subclasses were responsible for manually
invoking).
2017-09-25 18:56:37 -07:00
Sarah Zakarias ec2d1c9116 Add support for shared fonts in packages. (#12142) 2017-09-19 14:04:51 +02:00
Ian Hickson d658048986 Allow multiple FloatingActionButtons to be used on one screen. (#12074)
* Allow FloatingActionButton to not have a heroTag.
* Allow FloatingActionButton to not have a child.
* Allow Tooltip to not have a child.
* Improve the debug output of the default FloatingActionButton hero tag.
* Improve the error message in the Hero clashing-tag case.
* Improve the debug output of the Hero widget.
* Improve the debug output of gesture-related widgets.
* Minor improvements to documentation.
* Fix some typos in comments.
* Fix some style nits.
2017-09-15 10:46:30 -07:00
Chris Bracken dd7e313317 Migrate to os_log for reading iOS simulator logs (#12079)
1. Migrate simulator device log tailing to os_log toolchain
2. When the log tag (component) is available (iOS 11/Xcode 9), filter to
   the set of log lines with tag 'Flutter'.

As of iOS 11 / Xcode 9, Flutter engine logs are no longer recorded in the
simulator's syslog file, which we previously read using tail -f. Instead
they're now accessible through Apple's new macOS/iOS os_log facility,
via /usr/bin/log, which supports a relatively flexible query language.

When run in non-interactive mode, /usr/bin/log buffers its output in 4k
chunks, which is significantly smaller than what's emitted up to the
point where the observatory/diagnostics port information is logged. As a
workaround we force it to run in interactive mode via the script tool.
2017-09-14 12:28:21 -07:00
Alexander Aprelev 35c47611b9 Recreate outputFileName completer, handle process launch errors. (#11980)
* Recreate outputFileName completer, handle process launch errors.

* Fix formatting

* Updated comment
2017-09-13 07:33:52 -07:00
Sarah Zakarias e5aead03cc Comments to PR #12032 (#12045) 2017-09-12 12:53:03 +02:00
Sarah Zakarias 0b95e9c278 Support transitive asset dependency (#12032) 2017-09-12 09:13:41 +02:00
Mikkel Nygaard Ravn a1f03977ca Engine artifacts used for snapshots also specified as build inputs (#12014) 2017-09-12 08:35:02 +02:00
gspencergoog 267514346a Remove legacy --plugin option from flutter create (#12020)
Removed the legacy --plugin option from flutter create.  Fixes #11815.
2017-09-11 10:01:07 -07:00
Chris Bracken 8c61116c00 Eliminate iOS log blacklist (#11981)
This was introduced to suppress libMobileGestalt noise originating from
libsystem_asl.dylib. Commit 39680ebfbd
suppresses all application log messages not originating from the
app/engine iteself on iOS 10 and above. Since the log message in
question is only emitted on devices running iOS >= 10.3.0, this
blacklist no longer necessary.
2017-09-07 10:25:41 -07:00
Mikkel Nygaard Ravn 14016523ed Ensure snapshot rebuild logic takes main path into account (#11924) 2017-09-07 14:45:42 +02:00
Chris Bracken 39680ebfbd Suppress non-Flutter log messages in terminal (#11969)
On iOS 10 and above, suppress engine log messages from system components
other than Flutter. This eliminates a large amount of keyboard/plugin
related noise during edit-refresh development.
2017-09-06 19:46:40 -07:00
Mikkel Nygaard Ravn 8303fff8f9 Run pub in interactive mode in flutter packages pub (#11700) 2017-09-06 11:53:39 +02:00
Chris Bracken de736f0d43 Update minimum ios-deploy version to 1.9.2 (#11936)
ios-deploy 1.9.2 includes fixes for a common source of Xcode breakage
(flutter/flutter#4326) with Xcode 8.3.3 + iOS 10.3.3, and is required to
to support Xcode 9 (flutter/flutter#11875).
2017-09-05 16:26:36 -07:00
Chris Bracken c896fe2f6e Invalidate snapshot when entrypoint changes (#11913)
Adds the app entrypoint as a key in the checksum file.

This change eliminates the assumption that checksummed files change when
the main entrypoint changes. In the case where there are two
entrypoints, a.dart and b.dart and a.dart imports b.dart and b.dart
imports a.dart, building the app with entrypoint a.dart followed by a
build of the app with entrypoint b.dart would result in the same
files list and checksums, but should invalidate the build.
2017-09-05 11:19:09 -07:00
Mikkel Nygaard Ravn 9be9a40948 Avoid running pub get and analyze on every project during create_test (#11932) 2017-09-05 13:17:14 +02:00
Sarah Zakarias 02c10b78d2 Bundle assets used in packages (#11751) 2017-09-05 09:42:24 +02:00
Chris Bracken 4670c9266c Bugfix in build test: ensure prev snapshot exists (#11912)
Fix a test for build invalidation due to a change in main entry point.
Previously this test's build was always invalidated to the the lack of a
previous snapshot (as well as the change in checksums). This change
ensures that the build is invalidated only due to the change in
checksums.
2017-09-01 18:06:35 -07:00
Chris Bracken b29680cccf Improve readability of build_test JSON (#11911) 2017-09-01 18:06:13 -07:00
Alexandre Ardhuin 0783ec906b Enable lints (#11891)
* enable lint prefer_final_fields

* enable lint recursive_getters

* enable lint unnecessary_overrides
2017-09-01 22:18:51 +02:00
Chris Bracken eba6ceb85d Use idevice_id, ideviceinfo for iOS device listing (#11883)
This patch migrates iOS device listing from using Xcode instruments to
using the libimobiledevice tools idevice_id and ideviceinfo.

ideviceinfo was previously incompatible with iOS 11 physical devices;
this has now been fixed.

In 37bb5f1300 flutter_tools migrated from
libimobiledevice-based device listing on iOS to using Xcode instruments
to work around the lack of support for iOS 11. Using instruments entails
several downsides, including a significantly higher performance hit, and
leaking hung DTServiceHub processes in certain cases when a simulator is
running, necessitating workarounds in which we watched for, and cleaned
up leaked DTServiceHub processes. This patch returns reverts the move to
instruments now that it's no longer necessary.
2017-09-01 10:10:49 -07:00
Ian Hickson 2cbc4a0202 Make "pub get" retry once a second when it fails. (#11882) 2017-08-31 19:35:05 -07:00
Alexander Aprelev c5750cd7ea Introduce --preview-dart-2 option to run new frontend compiler in flutter tools. (#11741)
This adds --preview-dart-2 flag that enables use of Dart 2.0 Frontend in Flutter tools.
2017-08-31 13:35:55 -07:00
Alexandre Ardhuin bb4f4070f9 Prefer const constructors (#11853)
* upgrade to linter-0.1.35

* re-enable lint prefer_const_constructors

* address review comments
2017-08-31 08:55:21 +02:00