Elias Yishak
7a278ae47c
CommandResultEvent
migrated (#138165 )
...
Related to tracker issue:
- https://github.com/flutter/flutter/issues/128251
This event was only called from one file (`flutter_command.dart`). With the previous implementation, we actually sent 2 events, one for the result of the `commandPath` and another containing the `maxRss` value from `ProcessInfo`.
I have consolidated this down to just one event and used a function to safely get the `maxRss` value, or return null when if there was an error getting that integer value
2023-11-10 20:19:50 +00:00
Andrew Kolos
cdc40b5226
clean up --dart-define-from-file
option tests ( #135980 )
...
Fixes https://github.com/flutter/flutter/issues/134279 .
Changes:
* Moves all tests of `--dart-define-from-file` behavior from `build_bundle_test.dart` and `assemble_test.dart` to `flutter_command_test.dart`.
* Deletes a duplicate test of malformed JSON detection behavior.
* Renames the `useDartDefineFromFileOption` method of `FlutterCommand` to `_usesDartDefineFromFileOption`. This 1) makes the name more consistent with the other `uses*Option` methods and 2) hides the method since it is not used outside of the file.
* Renames several tests to better articulate what is under test and what the expected result is.
* Adds a test for the case where a `.env` file with a malformed line is provided to `--dart-define-from-file`.
2023-10-17 22:31:38 +00:00
Andrew Kolos
aa498cd51a
Add API to read flavor from framework at run time ( #134179 )
...
Resolves #128046 .
Adds a services API that allows flutter app developers to write app code that determines `--flavor` the app was built with.
This is implemented by having the tool adding the value of `--flavor` to its list of dart environment declarations, which will be available to the app at run time. Specifically,`FLUTTER_APP_FLAVOR` is set. I chose this implementation for its simplicity. There is some precedent for this, but only for web ([example](cd2f3f5e78/packages/flutter_tools/lib/src/runner/flutter_command.dart (L1231)
)).
2023-09-28 17:38:54 +00:00
Christopher Fujino
b2c65acd5a
[flutter_tools] Remove --no-sound-null-safety #4 ( #124039 )
...
Re-land of https://github.com/flutter/flutter/pull/123297 without any of
the commits at the end attempting to fix customer-testing.
Fixes https://github.com/flutter/flutter/issues/118810
2023-04-04 15:25:27 -07:00
Christopher Fujino
3736274a6d
Revert "[flutter_tools] Remove sound null safety flag ( #123031 )" ( #123280 )
...
Revert "[flutter_tools] Remove sound null safety flag (#123031 )"
2023-03-22 22:53:49 +00:00
Christopher Fujino
f4c3facfdd
Revert "Revert "[flutter_tools] Remove sound null safety flag ( #120936 )" ( #122909 )" ( #123031 )
...
[flutter_tools] Remove sound null safety flag #2
2023-03-20 22:32:07 +00:00
Christopher Fujino
f6bc147c91
Revert "[flutter_tools] Remove sound null safety flag ( #120936 )" ( #122909 )
...
This reverts commit 7c3088cf22
.
2023-03-17 11:31:48 -07:00
Christopher Fujino
7c3088cf22
[flutter_tools] Remove sound null safety flag ( #120936 )
...
[flutter_tools] Remove sound null safety flag
2023-03-17 17:48:35 +00:00
Victoria Ashworth
27248d4b64
Separate attached and wireless devices ( #122615 )
...
Separate attached and wireless devices
2023-03-15 16:35:05 +00:00
Victoria Ashworth
ee42a302ec
Move target devices logic to its own classes and file ( #121903 )
...
Move target devices logic to its own classes and file
2023-03-13 16:14:21 +00:00
Christopher Fujino
374f09e1a6
[flutter_tools] No more implicit --no-sound-null-safety ( #118491 )
...
* remove implicit no-sound-null-safety
* add test
* bump sdk constraint in test file
2023-01-18 20:46:09 +00:00
Andrew Kolos
ee1c59d462
reduce pub output from flutter create ( #118285 )
...
* reduce pub output from flutter create
* fix fake Pub implementations
* fix tests
* Update pub.dart
* replace enum with simpler boolean
* fix tests
* Revert "fix tests"
This reverts commit 8a3182d3b9
.
* Revert "replace enum with simpler boolean"
This reverts commit 445dbc443d
.
* go back to using an enum
2023-01-12 21:42:02 +00:00
Sigurd Meldgaard
b7881e5b64
Align flutter pub get/upgrade/add/remove/downgrade
( #117896 )
...
* Align `flutter pub get/upgrade/add/remove/downgrade`
* Add final . to command description
* Remove trailing whitespace
* Don't print message that command is being run
* Update expectations
* Use relative path
* Remove duplicated line
* Improve function dartdoc
2023-01-10 23:29:09 +00:00
Lau Ching Jun
2a73ce9b50
Refactor DeviceManager.findTargetDevices()
and FlutterCommand.findAllTargetDevices()
, and add a flag to not show prompt. ( #112223 )
2022-09-23 21:10:35 +00:00
Liam Appelbe
ec75399beb
Null safety migration of packages/flutter_tools/test/general.shard, part 1/2 ( #110711 )
...
* Migrate packages/flutter_tools/test/general.shard, part 1/2
* Fix most of the tests
* Fix analysis
* Fix analysis
* Fix test
* Fix analysis
* Fix analysis
* Fix nit
2022-09-08 15:25:27 -07:00
Sigurd Meldgaard
d80e994a62
Reland: Show output from pub get in flutter pub get ( #110851 )
2022-09-08 15:13:23 +02:00
Zachary Anderson
0e195e9d46
Revert "Show output from pub get
in flutter pub get
( #106300 )" ( #110478 )
...
This reverts commit 3802eb627e
.
2022-08-29 08:02:50 -07:00
Sigurd Meldgaard
3802eb627e
Show output from pub get
in flutter pub get
( #106300 )
2022-08-29 07:37:19 +00:00
Alexandre Ardhuin
07f1c20474
add missing trailing commas in list/set/map literals ( #102585 )
2022-04-27 09:15:35 +02:00
Jesús S Guerrero
3394fb4a58
[flutter_tools] fix flutter create --offline ( #100941 )
...
Co-authored-by: Christopher Fujino <christopherfujino@gmail.com>
2022-04-07 17:05:49 -07:00
Lau Ching Jun
dbed10bb59
Pass 'assume-initialize-from-dill-up-to-date' flag to the frontend server ( #99791 )
2022-03-09 00:30:17 -08:00
Christopher Fujino
e8ec8a0dfb
[flutter_tools] Catch lack of flutter tools source missing ( #93168 )
2021-11-12 14:43:52 -08:00
Greg Spencer
52ae102f18
Adds tool warning log level and command line options to fail on warning/error output ( #92031 )
2021-11-10 16:13:04 -08:00
Jenn Magder
9e88fe328e
Remove globals_null_migrated.dart, move into globals.dart ( #92861 )
2021-11-01 17:18:03 -07:00
Ian Hickson
61a0add286
Enable avoid_redundant_argument_values lint ( #91409 ) ( #91462 )
2021-10-08 09:25:14 -07:00
Zachary Anderson
b9d2177da0
Revert "Enable avoid_redundant_argument_values lint ( #91409 )" ( #91461 )
...
This reverts commit 5fd259be24
.
2021-10-07 21:11:07 -07:00
Ian Hickson
5fd259be24
Enable avoid_redundant_argument_values lint ( #91409 )
2021-10-07 20:13:02 -07:00
Greg Spencer
01af8e5987
Make flutter update-packages
run in parallel ( #91006 )
...
This modifies the flutter update-packages and flutter update-packages --force-upgrade commands so that the many invocations of "dart pub get" in each repo project run in parallel instead of in series.
2021-09-30 10:26:31 -07:00
Remi Rousselet
1995da2c0c
Disable the automatic "pub get" if the project is using a third-party tool for linking dependencies. ( #86177 )
2021-07-19 08:06:03 -07:00
Ahmed Ashour
529a599ce6
Fix some indentation ( #84967 )
2021-07-01 13:41:04 -07:00
Lau Ching Jun
a9d6131df8
Allow passing --initialize-from-dill
to flutter run and flutter attach ( #83454 )
...
To specify the dill file that will be used to initialize the resident
compiler, instead of the default cached version.
2021-05-26 23:06:38 -07:00
Lau Ching Jun
fdb1fb184d
Add MultiRootFileSystem to better support using --filesystem-root. ( #82991 )
2021-05-24 22:04:02 -07:00
Lau Ching Jun
2acd0007d6
Refactor CustomDimensions in analytics to be type safe ( #82531 )
2021-05-18 20:29:03 -07:00
Alexandre Ardhuin
7d46d43635
use throwsXxx instead of throwsA(isA<Xxx>()) ( #82328 )
2021-05-12 09:59:02 -07:00
Alexandre Ardhuin
4881b33515
use throwsA matcher instead of try-catch-fail ( #82290 )
2021-05-11 23:34:02 -07:00
Jonah Williams
886eb3e634
[flutter_tools] remove mocks from ios_device, project, flutter_command test ( #82195 )
2021-05-10 17:44:03 -07:00
Ian Hickson
e5414695d4
Change --disable-dds to --no-dds to avoid double negatives ( #80900 )
...
Also, refactor internal code to do the same.
See https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#avoid-double-negatives-in-apis
2021-04-23 16:29:38 -07:00
Phil Quitslund
61c30c41b2
fix sort_directives violations ( #80817 )
2021-04-21 13:49:03 -07:00
Jenn Magder
ff7b91b932
Migrate tools test fakes to null safety ( #80154 )
2021-04-09 17:32:54 -07:00
Lau Ching Jun
db51c6d510
Expose packagePath
as a getter in FlutterCommand. ( #80026 )
2021-04-08 15:19:10 -07:00
Jenn Magder
a2f67720ef
Migrate test/src/common to null safety ( #79907 )
2021-04-06 22:55:03 -07:00
Jenn Magder
eb9a2f0ca5
Move cache from globals to globals_null_migrated ( #79900 )
2021-04-06 17:57:40 -07:00
Jia Hao
aa1df71c20
[flutter_tools] throwToolExit should return Never ( #78954 )
2021-03-24 10:40:03 -07:00
Jonah Williams
9f420ffb3e
[flutter_tools] io cleanups to simplify null safety migration ( #77955 )
2021-03-12 16:21:14 -08:00
Jenn Magder
d6f5767ec8
Remove MockFlutterVersions ( #77962 )
2021-03-11 16:05:05 -08:00
Michael Goderbauer
cb867bbedc
Enable unnecessary_await_in_return lint ( #77434 )
2021-03-05 18:38:15 -08:00
Jenn Magder
4436334f8a
Adopt TestUsage in flutter_command_test ( #76282 )
2021-02-18 12:52:04 -08:00
Jenn Magder
9236eefdff
MockPub -> FakePub ( #75759 )
2021-02-10 17:01:20 -08:00
Ian Hickson
8acac060bf
Remove the timeout when launching DevTools ( #74859 )
2021-02-01 16:06:02 -08:00
Jonah Williams
e53c48968f
[flutter_tools] remove mock SystemClock ( #74994 )
2021-01-29 14:28:08 -08:00