Commit Graph

50 Commits

Author SHA1 Message Date
Jenn Magder
c6ced845e3
Remove custom unawaited, prefer dart:async version (#103212) 2022-05-07 08:49:04 -07:00
Alexandre Ardhuin
07f1c20474
add missing trailing commas in list/set/map literals (#102585) 2022-04-27 09:15:35 +02:00
Jenn Magder
b460d0ee34
Migrate emulators to null safety (#92738) 2021-11-18 22:13:06 -08:00
Marian Triebe
2d283504e6
Add cold boot option to emulator launch command (#82647) 2021-05-19 10:54:04 -07:00
Jonah Williams
d4e48a1537
[flutter_tools] remove mocks from android emulator tests (#81548) 2021-04-30 17:39:03 -07:00
Jonah Williams
021311ed8a
Revert "[flutter_tools] move process manager into tool (#75350)" (#75639)
This reverts commit 8b6baae44c.
2021-02-08 09:21:46 -08:00
Jonah Williams
8b6baae44c
[flutter_tools] move process manager into tool (#75350)
Our current top crasher is an unclear error when ProcessManager fails to resolve an executable path. To fix this, we'd like to being adjusting the process resolution logic and adding more instrumentation to track failures. In order to begin the process, the ProcessManager has been folded back into the flutter tool
2021-02-04 13:19:11 -08:00
Jonah Williams
74bd7b6f6d
[flutter_tools] opt all flutter tool libraries and tests out of null safety. (#74832)
* opt out the flutter tool

* oops EOF

* fix import

* Update tool_backend.dart

* Update daemon_client.dart

* fix more
2021-01-27 15:17:53 -08:00
Jenn Magder
cdacae89e1
Revert "Launch named iOS simulators (#72323)" (#72447)
This reverts commit 84a7a611b0.
2020-12-16 11:52:59 -08:00
Jenn Magder
84a7a611b0
Launch named iOS simulators (#72323) 2020-12-15 15:06:47 -08:00
Jonah Williams
fb90544cab
[flutter_tools] remove unused or no longer useful code (#69547) 2020-11-02 22:48:03 -08:00
Danny Tuppeny
fdd1bf2944
Handle missing Android SDKs in getEmulators() (#67295) 2020-10-05 08:57:04 -07:00
Jonah Williams
4954a46ff0
[flutter_tools] shrink API surface of Android SDK (#63867)
Attempt to simplify the Android SDK interface ahead of refactoring it. The locateAndroidSdk static method is called at startup to locate the android SDK, returning null if it cannot be found. These helper methods attempted to first look up the AndroidSDK if it was already null - which could only cover the case where someone installed the Android SDK while flutter was running (possibly through an IDE)
2020-08-19 14:44:56 -07:00
Jonah Williams
f640ad6914
[flutter_tools] ensure emulator command does not crash with missing avdmanager (#57703) 2020-05-27 10:10:30 -07:00
Jenn Magder
c587d73ec6
Use androidSdk globals variable everywhere (#56330) 2020-05-04 17:48:10 -07:00
Jenn Magder
ba57ea09d1
Revert "Move processUtils into globals (#53209)" (#53301) 2020-03-25 14:59:03 -07:00
Jenn Magder
9ccac00599
Move processUtils into globals (#53209) 2020-03-25 11:23:08 -07:00
Dan Field
8b2993337a
revert #48985 (#49572) 2020-01-27 14:36:02 -08:00
Anthony
b67d5ec6e9 [a11y] Make sure RenderFractionalTranslation updates its semantics after the translation field is set (#48985) 2020-01-17 15:13:01 -08:00
Zachary Anderson
e8222aaf9a [flutter_tool] Don't crash on Android emulator startup failure (#48995) 2020-01-17 09:28:01 -08:00
Alexandre Ardhuin
4f9b6cf017
enable lint prefer_final_in_for_each (#47724) 2020-01-07 16:32:04 +01:00
Jonah Williams
ee7a37f1d3
[flutter_tools] Ensure that global variables are easily identifiable (#47398) 2020-01-06 11:04:20 -08:00
Ian Hickson
449f4a6673
License update (#45373)
* Update project.pbxproj files to say Flutter rather than Chromium

Also, the templates now have an empty organization so that we don't cause people to give their apps a Flutter copyright.

* Update the copyright notice checker to require a standard notice on all files

* Update copyrights on Dart files. (This was a mechanical commit.)

* Fix weird license headers on Dart files that deviate from our conventions; relicense Shrine.

Some were already marked "The Flutter Authors", not clear why. Their
dates have been normalized. Some were missing the blank line after the
license. Some were randomly different in trivial ways for no apparent
reason (e.g. missing the trailing period).

* Clean up the copyrights in non-Dart files. (Manual edits.)

Also, make sure templates don't have copyrights.

* Fix some more ORGANIZATIONNAMEs
2019-11-27 15:04:02 -08:00
Zachary Anderson
73c10e8ced
[flutter_tool] process.dart cleanup (#39899) 2019-09-11 18:20:42 -07:00
Alexandre Ardhuin
c7408be181
prepare for lint update of prefer_final_fields (#35059) 2019-06-25 19:39:34 +02:00
Danny Tuppeny
8dbfc82bc7
Tweak the display name of emulators (#34785) 2019-06-24 11:41:02 +01:00
Danny Tuppeny
d9983e1be7
Add category/platformType to emulators (#34721) 2019-06-19 17:10:39 +01:00
Alexandre Ardhuin
387f885481
Add missing trailing commas (#28673)
* add trailing commas on list/map/parameters

* add trailing commas on Invocation with nb of arg>1

* add commas for widget containing widgets

* add trailing commas if instantiation contains trailing comma

* revert bad change
2019-03-01 08:17:55 +01:00
Alexandre Ardhuin
ef276ffea5
format initializer list of constructors (#27111) 2019-01-29 21:47:16 +01:00
Ian Hickson
31a9626c48
[O] Removing all timeouts (mark II) (#26736)
These are essentially self-inflicted race conditions. Instead of timeouts we're going to try a more verbose logging mechanism that points out when things are taking a long time.
2019-01-19 00:31:05 -08:00
Ian Hickson
8426910a19
Revert "[O] Remove many timeouts. (#23531)" (#25646)
This reverts commit 76f70810e4.
2018-12-20 18:46:36 -08:00
Ian Hickson
76f70810e4
[O] Remove many timeouts. (#23531)
* Remove many timeouts.

These are essentially self-inflicted race conditions. Instead of timeouts we're going to try a more verbose logging mechanism that points out when things are taking a long time.

* Get the attach tests to pass.

* Apply review comments from Todd

* More review comment fixes

* Put back the extended timeouts here now that I know why we have them...
2018-12-20 17:10:40 -08:00
Alexandre Ardhuin
f62afdcf57
add missing type parameter on methods (#22096) 2018-10-01 21:29:08 +02:00
Tran Huy Phuc
481cb77a4c Fix flutter emaultors crash when ini file is not parsed (#22503)
Fixes #22247.
2018-10-01 18:02:43 +01:00
Alexandre Ardhuin
d927c93310
Unnecessary new (#20138)
* enable lint unnecessary_new

* fix tests

* fix tests

* fix tests
2018-09-12 08:29:29 +02:00
Danny Tuppeny
cdb01187f8
Add --create option to flutter emulators command (#18235)
* Add --create option to flutter emulators

* Tweaks to error message

* Simplify emulator search logic

* Make name optional

* Add a note about this option being used with --create

* Tweaks to help information

* Switch to processManager for easier testing

* Don't crash on missing files or missing properties in Android Emulator

* Move name suffixing into emulator manager

This allows it to be tested in the EmulatorManager tests and also used by daemon later if desired.

* Pass the context's android SDK through so it can be mocked by tests

* Misc fixes

* Add tests around emulator creation

Process calls are mocked to avoid needing a real SDK (and to be fast). Full integration tests may be useful, but may require ensuring all build environments etc. are set up correctly.

* Simplify avdManagerPath

Previous changes were to emulatorPath!

* Fix lint errors

* Fix incorrect file exgtension for Windows

* Fix an issue where no system images would crash

reduce throws on an empty collection.

* Fix "null" appearing in error messages

The name we attempted to use will now always be returned, even in the case of failure.

* Add additional info to missing-system-image failure message

On Windows after installing Andriod Studio I didn't have any of these and got this message. Installing with sdkmanager fixed the issue.

* Fix thrown errors

runResult had a toString() but we moved to ProcessResult when switching to ProcessManager to this ended up throwing "Instance of ProcessResult".

* Fix package import

* Fix more package imports

* Move mock implementation into Mock class

There seemed to be issues using Lists in args with Mockito that I couldn't figure out (docs say to use typed() but I couldn't make this compile with these lists still)..

* Rename method that's ambigious now we have create

* Handle where there's no avd path

* Add another toList() :(

* Remove comment that was rewritten

* Fix forbidden import

* Make optional arg more obviously optional

* Reformat doc

* Note that we create a pixel device in help text

* Make this a named arg
2018-06-28 08:07:40 +01:00
Danny Tuppeny
48f4ff6dda
Ensure errors launching emulators are exposed to the daemon (#18446) 2018-06-14 07:59:50 +01:00
Danny Tuppeny
e2181a6ad9
First run simulator with -n to ensure it always opens a device (#17460) 2018-05-22 07:35:42 +01:00
Danny Tuppeny
7a810261fa Only wait up to 3 seconds for emulator
Emaultor keeps running on a seuccessful launch, so this automatically returns after 3 seconds if the process hasn't quit (we have to wait for some period to get stderr in the case of a failure).
2018-05-09 16:03:59 +01:00
Danny Tuppeny
11076bfb43 Add missing awaits 2018-05-09 16:03:59 +01:00
Danny Tuppeny
90bdcef9f9 Remove redundant lines from errors 2018-05-09 16:03:59 +01:00
Danny Tuppeny
1037586dd7 Don't try to build emulators from empty output 2018-05-09 16:03:59 +01:00
Danny Tuppeny
7a33888693 Tidy up 2018-05-09 16:03:59 +01:00
Danny Tuppeny
b096c57bbd Remove launch status
It's too fast and leaves weird output on the screen
2018-05-09 16:03:59 +01:00
Danny Tuppeny
6ff84d084b Improve formatting 2018-05-09 16:03:59 +01:00
Danny Tuppeny
799678f0a7 Add some tests around device+ini parsing 2018-05-09 16:03:59 +01:00
Danny Tuppeny
4c67885b8e Add support for launching emulators 2018-05-09 16:03:59 +01:00
Danny Tuppeny
4d7c3c775f Read information about AVDs from config.ini 2018-05-09 16:03:59 +01:00
Danny Tuppeny
2bdb3bbe0e Fix references to Devices and remove unused properties 2018-05-09 16:03:59 +01:00
Danny Tuppeny
53840fb0ce Add basic support for listing Android AVDs
Very basic support for "flutter emulators" which just lists the available Android AVDs.

Relates to:

https://github.com/flutter/flutter/issues/14822
https://github.com/Dart-Code/Dart-Code/issues/490
https://github.com/flutter/flutter/issues/13379
2018-05-09 16:03:59 +01:00