flutter/packages/flutter_tools/test/src
Christopher Fujino 3246808cd2
[flutter_tools] cache flutter sdk version to disk (#124558)
Fixes https://github.com/flutter/flutter/issues/112833

Most of the actual changes here are in [packages/flutter_tools/lib/src/version.dart](https://github.com/flutter/flutter/pull/124558/files#diff-092e00109d9e1589fbc7c6de750e29a6ae512b2dd44e85d60028953561201605), while the rest is largely just addressing changes to the constructor of `FlutterVersion` which now has different dependencies.

This change makes `FlutterVersion` an interface with two concrete implementations:

1. `_FlutterVersionGit` which is mostly the previous implementation, and
2. `_FlutterVersionFromFile` which will read a new `.version.json` file from the root of the repo

The [`FlutterVersion` constructor](https://github.com/flutter/flutter/pull/124558/files#diff-092e00109d9e1589fbc7c6de750e29a6ae512b2dd44e85d60028953561201605R70) is now a factory that first checks if `.version.json` exists, and if so returns an instance of `_FlutterVersionFromGit` else it returns the fallback `_FlutterVersionGit` which will end up writing `.version.json` so that we don't need to re-calculate the version on the next invocation.

`.version.json` will be deleted in the bash/batch entrypoints any time we need to rebuild he tool (this will usually be because the user did `flutter upgrade` or `flutter channel`, or manually changed the commit with git).
2023-06-15 00:20:30 +00:00
..
android_common.dart Adds vmservices to retrieve android applink settings (#125998) 2023-06-07 22:43:11 +00:00
common.dart Add spaces after flow control statements (#126320) 2023-05-15 11:07:30 +02:00
context.dart [flutter_tools] only try to take a screenshot from flutter drive if the --screenshot flag is passed (#127150) 2023-05-19 19:14:17 +00:00
custom_devices_common.dart Remove dead code in tools tests (#104567) 2022-05-25 12:48:17 -07:00
fake_devices.dart Add spaces after flow control statements (#126320) 2023-05-15 11:07:30 +02:00
fake_http_client.dart tool: use switch expressions (#125930) 2023-05-03 21:00:08 +00:00
fake_process_manager.dart [flutter_tools] Suppress git output in flutter channel (#128475) 2023-06-13 19:28:06 +00:00
fake_vm_services.dart Remove uses of deprecated test_api imports (#124732) 2023-04-20 20:55:28 +00:00
fakes.dart [flutter_tools] cache flutter sdk version to disk (#124558) 2023-06-15 00:20:30 +00:00
io.dart enable combinators_ordering (#107847) 2022-07-18 22:04:07 +00:00
logging_logger.dart [flutter_tools] Make flutter test -v print timing of different phases (#108864) 2022-08-18 16:26:56 +00:00
pubspec_schema.dart FFI plugins (#96225) 2022-01-26 23:44:45 +01:00
test_build_system.dart Change all instance of throwing strings to throw specific error classes. (#97325) 2022-02-02 10:45:18 -08:00
test_flutter_command_runner.dart Remove uses of deprecated test_api imports (#124732) 2023-04-20 20:55:28 +00:00
test_wrapper.dart Migrate android_console to null safety (#78923) 2021-03-24 15:18:00 -07:00
testbed.dart [flutter_tools] update test/src to null safety (#106064) 2022-06-16 16:48:03 -07:00
throwing_pub.dart reduce pub output from flutter create (#118285) 2023-01-12 21:42:02 +00:00