Commit graph

2624 commits

Author SHA1 Message Date
Jonah Williams c034f1a1cc
[flutter_tools] fix screenshot command in release mode and help documentation (#65114)
Currently taking a screenshot in release mode crashes and is also not documented as a supported command. Fix both of these and add test cases.
2020-09-02 17:33:41 -07:00
includecmath 6d46ff7e9b
[flutter_tools] flutter run should allow exit when make choose for devices. (#64403) 2020-09-02 17:30:04 -07:00
Jonah Williams d3fd62c843
[flutter_tools] exit with helpful message if where is missing on windows (#65112) 2020-09-02 16:50:04 -07:00
Jenn Magder 6175183545
Add --device-timeout flag to device-related commands (#64834) 2020-09-02 15:38:52 -07:00
Jenn Magder cb819504f3
Revert "Add observatory Bonjour service to built iOS Info.plist bundle (#64988)" (#65109)
This reverts commit 4fde217dea.
2020-09-02 12:31:17 -07:00
Jenn Magder 4fde217dea
Add observatory Bonjour service to built iOS Info.plist bundle (#64988) 2020-09-02 11:11:07 -07:00
stuartmorgan 6eef5f2c5f
Share build command flag configuration on desktop (#64983)
Almost all of the flag setup on Linux, macOS, and Windows should be
identical; this pulls that common setup to a shared method.

This adds support for several flags on macOS that have all the necessary
plumbing already in place due to shared backend code, but were never
enabled.

Fixes https://github.com/flutter/flutter/issues/64944
2020-09-01 10:21:51 -07:00
Jonah Williams 216da410a8
[flutter_tools] add --config-only option to flutter build ios (#64848) 2020-08-31 17:23:03 -07:00
Jonah Williams 183a653e37
[flutter_tools] adjust index.html caching and insert cache busting URL in to main.dart.js/sw request (#64976)
Attempt to bypass aggressive CDN by requesting main.dart.js/sw.js with a query param and defaulting index.html to online first. This will not stop aggressive CDN caching of the index.html

#64968
2020-08-31 17:22:42 -07:00
Mehmet Fidanboylu 66b01c1f29
Revert "Reland "Re-enable the Dart Development Service (DDS) (#64671)" (#64847)" (#64981)
This reverts commit c8f234d365.
2020-08-31 16:09:02 -07:00
Jonah Williams 15d18b9e42
[flutter_tools] remove unused zip verification (#64970)
This is no longer used, in favor of just attempting to unzip and handling the exception.
2020-08-31 13:26:38 -07:00
Jonah Williams 68b39da346
[flutter_tools] tool exit after repeated network failure (#64878)
Exit the tool after a repeated network error to download. previously we were returning null and continuing on, leading to a ProcessException when we unzipped a missing file.
2020-08-31 12:15:05 -07:00
Ben Konyi c8f234d365
Reland "Re-enable the Dart Development Service (DDS) (#64671)" (#64847)
This reverts commit 2436de1391.
2020-08-31 12:14:32 -07:00
ekibun 719268b43a
add different workload & add -products * to vswhere calls to check both Visual Studio IDE and standalone Build Tools. (#64251) 2020-08-31 09:33:04 -07:00
Shi-Hao Hong fd22fc3e35
[gen_l10n] Synthetic package generation by default (#62395)
* synthetic packages by default in gen_l10n tool

* Refactor default path for synthetic package

* Remove unused import

* Code cleanup

* Further improvements to help text

* Refactor synthetic package path

* Remove newlines

* Test cleanup

* clean up logic in inputs and outputs list function

* Update l10n.yaml usage

* only add option if value is non-null

* Update stocks app as proof of concept for synthetic package usage

* Address nits

* print pubspec contents

* add print statements

* Do not allow null value for useSyntheticPackage

* +

* +

* +

* +

* Cleanup

* Add test

* Fix text

* Dont parse pubspec directly

* Test using context

* WIP: generate synthetic packages on pub get -- needs tests

* Allow null value

* Update null handling

* Refactor to properly handle null case

* Fix yamlMap condition

* Fix yaml node for real

* WIP: struggling to write tests

* WIP - take absolute path as an option

* Add tests

* Use environment project directory for synthetic package generation pathway

* Fix typo

* Improve help text

* Update defaults

* Remove unauthorized path import

* Fix pathing issues at synthetic package generation

* Fix typo in test

* Use path.join so projectDir matches up based on OS

* Fix Windows pathing in test

* Remove unnecessary replaceApp code for projectDir.path

* Use globals.fs.currentDirectory.path in resident_runner_test.dart

* Fix merge conflict

* Add test to ensure that synthetic package is generated on pub get

* Fix resident_runner_test.dart tests

* Fix tests

* Use package:file instead of dart:io

* WIP - exploration

* Remove synthetic package use from stocks example

* Update integration test to not use synthetic packages

* Remove trailing whitespace

* flutter pub get runs synth package generation

* Remove more print statements

* Add license header

* WIP - minimally working pub.get

* Use own MockBuildSystem

* Modify test and implementation to be a little cleaner

* Fix flutter pub get invocation

* Use synthetic packages in stocks app

* Revert "Use synthetic packages in stocks app"

This reverts commit 45bf24903c.

* Add environment and buildSystem params to flutter test

* Address code review feedback

* +

* Isolate codegen into its own API

* Fix imports

* Slight refactor

* Add one more test for no l10n.yaml file

* Remove unneeded mock class and import in pub_get_test.dart

* More code review feedback

* Remove unnecessary imports

* Remove `return await`s that I missed

* use arrow functions instead
2020-08-31 13:19:41 +08:00
Jonah Williams 2436de1391
Revert "Reland "Re-enable the Dart Development Service (DDS) (#64671)" (#64802)" (#64845)
This reverts commit eef0050d08.
2020-08-28 18:02:15 -07:00
Ben Konyi eef0050d08
Reland "Re-enable the Dart Development Service (DDS) (#64671)" (#64802)
* Reland "Re-enable the Dart Development Service (DDS) (#64671)"

This reverts commit 2ae25cc2d7.

* Fix MDNS building Observatory URI with port 0 instead of forwarding the device port

* Added MDNS test
2020-08-28 16:18:35 -07:00
Ben Konyi 2ae25cc2d7
Revert "Re-enable the Dart Development Service (DDS) (#64671)" (#64797)
This reverts commit d7d12412e5.
2020-08-28 09:00:53 -07:00
Jonah Williams 5a4fa220e2
[flutter_tools] handle OsError thrown during azure detector (#64749) 2020-08-27 17:13:04 -07:00
Ben Konyi d7d12412e5
Re-enable the Dart Development Service (DDS) (#64671)
This change re-enables DDS and outputs the DDS URI in place of the VM
service URI on the console. If --disable-dds is not provided,
--host-vmservice-port will be used to determine the port for DDS rather
than the host port for the VM service, which will instead be randomly
chosen.
2020-08-27 16:35:00 -07:00
Jonah Williams d3515f5fb6
[flutter_tools] add analytics to code size, add more testing (#64578)
* [flutter_tools] add analytics to code size, add more testing

* add gradle case

* Update build_macos_test.dart

* move analytics to code size tooling

* Update analyze_size.dart

* fix analysis
2020-08-27 09:45:10 -07:00
Jonah Williams 401d401c59
[flutter_tools] reland: avoid creating Android Devices if AndroidSDK cannot be found (#64665)
Avoid creating AndroidDevice discovery if the SDK cannot be located. Previously the tool would use which/where adb, however this required us to handle the AndroidSdk class being potentially null - which required an additional layer of indirection around all access. Sometimes these were forgotten leading to NPEs.

In general, not much can be done with an Android Device if the actual SDK is not installed.

Reland with fixed code + tests for null SDK + adb in AndroidDeviceDiscovery
2020-08-27 09:44:31 -07:00
Jenn Magder f5187535d5
Revert "[flutter_tools] avoid creating Android Devices if AndroidSDK cannot be found (#64524)" (#64602)
This reverts commit 47596c6203.
2020-08-25 17:55:58 -07:00
Jonah Williams 47596c6203
[flutter_tools] avoid creating Android Devices if AndroidSDK cannot be found (#64524)
Avoid creating AndroidDevice discovery if the SDK cannot be located. Previously the tool would use which/where adb, however this required us to handle the AndroidSdk class being potentially null - which required an additional layer of indirection around all access. Sometimes these were forgotten leading to NPEs.

In general, not much can be done with an Android Device if the actual SDK is not installed.
2020-08-25 11:08:27 -07:00
Jonah Williams f0a3cbace3
[flutter_tools] handle FileSystemException thrown when attempting to decode stamp file (#64559)
Fixes #64246

If decoding the string contents of a stamp file fails, treat it as if the stamp file is missing. This is always safe to do, since at worst it downloads more artifacts. The files could end up corrupted if they were edited by another program, for example
2020-08-25 10:58:21 -07:00
Jonah Williams 23032d772d
[flutter_tools] refactor artifact downloading to retry zip exceptions. (#64512) 2020-08-25 10:06:04 -07:00
Jonah Williams 059de1537e
[flutter_tools] support code size tooling on iOS, linux, windows, macOS, and Android on Windows (#63610)
Adds support for size analysis on iOS, macOS, linux, and Windows - using an uncompressed directory based approach. The output format is not currently specified.

Adds support for size analysis on android on windows, switching to package:archive

Updates the console format to display as a tree, allowing longer paths. Increases the number of dart libraries shown (to avoid only ever printing the flutter/dart:ui libraries, which dominate the size)
2020-08-25 10:00:24 -07:00
Jonah Williams 302f9f751b
[flutter_tools] remove globals from utils (#63831) 2020-08-24 15:26:03 -07:00
Jonah Williams ed4a8e8d05
Revert "Pass --verbose-logging to flutter_tester (#64440)" (#64517)
This reverts commit 8b52e6a8b2.
2020-08-24 14:50:38 -07:00
Todd Volkert 8b52e6a8b2
Pass --verbose-logging to flutter_tester (#64440) 2020-08-24 13:33:56 -07:00
Jonah Williams ee12d7c3fc
[flutter_tools] check for permission issues when copying file (#63540) 2020-08-21 11:11:04 -07:00
xster a2e5e074ab
Move Android doctor SDK check to 29 and Cirrus images to 30 (#63517) 2020-08-20 11:06:32 -07:00
xster e1ae4dfcae
Move v1 embedding migration warning from plugin consumers to all apps (#64181) 2020-08-19 22:32:08 -07:00
Jonah Williams 69fd5c50a2
[flutter_tools] null assertions off by default for web (#64186)
Like Android/iOS, only enable --null-assertions if asked. Previously this was enabled by default for web, but in general this has proved to be too breaking to enable by default.

#61042
2020-08-19 14:52:47 -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
Zachary Anderson 6f78131474
WIP: [flutter_tool] Fix amberctl host address (#64020) 2020-08-19 14:41:05 -07:00
Jenn Magder 6ca9cd7b8f
Use real flutter root for finding pub in command integration test (#64021) 2020-08-18 17:09:02 -07:00
Jonah Williams a42c56791b
[flutter_tools] shrink fingerprinter API to currently used subset (#63840) 2020-08-18 17:01:06 -07:00
Jonah Williams 39c735f408
[flutter_tools] correctly forward error only stdout in non-verbose modes (#63815) 2020-08-18 16:56:05 -07:00
Albert Viilik 654022aecb
Make deprecation notice link to website downloads (#63829) 2020-08-17 17:01:02 -07:00
Jonah Williams 042fa8cf66
[flutter_tools] trim trailing newline from vm service logging events (#63976) 2020-08-17 12:26:03 -07:00
Zachary Anderson 1884920e30
[flutter_tool] Handle Windows line endings in packages_test.dart (#63806) 2020-08-17 11:41:08 -07:00
stuartmorgan 70bd819c52
Separate blkid in the Linux library checks (#63810) 2020-08-17 10:51:03 -07:00
Helin Shiah 3d3b5349a7
Return host and port from devtools launcher (#63795) 2020-08-17 10:46:05 -07:00
Jonah Williams 08254b2156
Revert "Remove TODOs added for HTTP abort() change in dart sdk (#63924)" (#63972)
This reverts commit b1c17313f6.
2020-08-17 10:25:01 -07:00
zichangg b1c17313f6
Remove TODOs added for HTTP abort() change in dart sdk (#63924) 2020-08-17 09:46:08 -07:00
Zachary Anderson f360d8b8e8
[flutter_tool] Fix some create_test.dart tests on Windows (#63796) 2020-08-14 15:26:29 -07:00
stuartmorgan 6f0cfc9524
Surface Windows build errors in non-verbose mode (#63707) 2020-08-13 19:46:02 -07:00
Jonah Williams 06c3de3285
[flutter_tools] remove most globals from build system and tests (#63697)
Remove globals and testbed to simplify test cases, using the existing environment configuration. This is some pre-factoring work to make landing #63610 easier
2020-08-13 15:00:27 -07:00
Shi-Hao Hong 0a7c6243fa
[gen_l10n] Absolute project path parameter (#63368) 2020-08-13 05:11:05 -07:00