Add pre-stable support for create on Windows (#51895)
Adds initial support for flutter create of apps and plugins. This is derived from the current FDE example app and sample plugin, adding template values where relevant.
Since the APIs/tooling/template aren't stable yet, the app template includes a version marker, which will be updated each time there's a breaking change. The build now checks that the template version matches the version known by that version of the tool, and gives a specific error message when there's a mismatch, which improves over the current breaking change experience of hitting whatever build failure the breaking change causes and having to figure out that the problem is that the runner is out of date. It also adds a warning to the create output about the fact that it won't be stable.
Plugins don't currently have a version marker since in practice this is not a significant problem for plugins yet the way it is for runners; we can add it later if that changes.
Fixes #30704
diff --git a/dev/bots/analyze.dart b/dev/bots/analyze.dart
index 20f65e9..7a852d9 100644
--- a/dev/bots/analyze.dart
+++ b/dev/bots/analyze.dart
@@ -603,6 +603,7 @@
.where((File file) => path.extension(file.path) != '.snapshot')
.where((File file) => path.extension(file.path) != '.png')
.where((File file) => path.extension(file.path) != '.jpg')
+ .where((File file) => path.extension(file.path) != '.ico')
.where((File file) => path.extension(file.path) != '.jar')
.toList();
final List<String> problems = <String>[];
@@ -685,7 +686,9 @@
// DO NOT ADD ANY ENTRIES TO THIS LIST.
// We have a policy of not checking in binaries into this repository.
-// If you have binaries to add, please consult Hixie for advice.
+// If you are adding/changing template images, use the flutter_template_images
+// package and a .img.tmpl placeholder instead.
+// If you have other binaries to add, please consult Hixie for advice.
final Set<Hash256> _grandfatheredBinaries = <Hash256>{
// DEFAULT ICON IMAGES
@@ -1044,7 +1047,9 @@
Future<void> verifyNoBinaries(String workingDirectory, { Set<Hash256> grandfatheredBinaries }) async {
// Please do not add anything to the _grandfatheredBinaries set above.
// We have a policy of not checking in binaries into this repository.
- // If you have binaries to add, please consult Hixie for advice.
+ // If you are adding/changing template images, use the flutter_template_images
+ // package and a .img.tmpl placeholder instead.
+ // If you have other binaries to add, please consult Hixie for advice.
assert(
_grandfatheredBinaries
.expand<int>((Hash256 hash) => <int>[hash.a, hash.b, hash.c, hash.d])