Adding minzip to packaging steps for Windows (#13679)

This adds our self-compiled copy of the MinGit executable (built from the flutter/git repo) to the archive when building an archive for Windows.

I also tweaked the internal API for prepare_package.dart so that there's a single entry point to build an archive.
diff --git a/dev/automated_tests/pubspec.yaml b/dev/automated_tests/pubspec.yaml
index f563d6a..73ea3b2 100644
--- a/dev/automated_tests/pubspec.yaml
+++ b/dev/automated_tests/pubspec.yaml
@@ -38,7 +38,7 @@
   source_maps: 0.10.4 # TRANSITIVE DEPENDENCY
   source_span: 1.4.0 # TRANSITIVE DEPENDENCY
   stack_trace: 1.9.1 # TRANSITIVE DEPENDENCY
-  stream_channel: 1.6.2 # TRANSITIVE DEPENDENCY
+  stream_channel: 1.6.3 # TRANSITIVE DEPENDENCY
   string_scanner: 1.0.2 # TRANSITIVE DEPENDENCY
   term_glyph: 1.0.0 # TRANSITIVE DEPENDENCY
   test: 0.12.26 # TRANSITIVE DEPENDENCY
diff --git a/dev/benchmarks/complex_layout/pubspec.yaml b/dev/benchmarks/complex_layout/pubspec.yaml
index 53f21c6..3f60a40 100644
--- a/dev/benchmarks/complex_layout/pubspec.yaml
+++ b/dev/benchmarks/complex_layout/pubspec.yaml
@@ -53,7 +53,7 @@
   source_maps: 0.10.4 # TRANSITIVE DEPENDENCY
   source_span: 1.4.0 # TRANSITIVE DEPENDENCY
   stack_trace: 1.9.1 # TRANSITIVE DEPENDENCY
-  stream_channel: 1.6.2 # TRANSITIVE DEPENDENCY
+  stream_channel: 1.6.3 # TRANSITIVE DEPENDENCY
   string_scanner: 1.0.2 # TRANSITIVE DEPENDENCY
   term_glyph: 1.0.0 # TRANSITIVE DEPENDENCY
   test: 0.12.26 # TRANSITIVE DEPENDENCY
diff --git a/dev/benchmarks/microbenchmarks/pubspec.yaml b/dev/benchmarks/microbenchmarks/pubspec.yaml
index 9b2b787..c8813bc 100644
--- a/dev/benchmarks/microbenchmarks/pubspec.yaml
+++ b/dev/benchmarks/microbenchmarks/pubspec.yaml
@@ -34,7 +34,7 @@
   package_config: 1.0.3 # TRANSITIVE DEPENDENCY
   package_resolver: 1.0.2 # TRANSITIVE DEPENDENCY
   path: 1.5.1 # TRANSITIVE DEPENDENCY
-  petitparser: 1.6.1 # TRANSITIVE DEPENDENCY
+  petitparser: 1.7.0 # TRANSITIVE DEPENDENCY
   pool: 1.3.3 # TRANSITIVE DEPENDENCY
   pub_semver: 1.3.2 # TRANSITIVE DEPENDENCY
   quiver: 0.26.2 # TRANSITIVE DEPENDENCY
@@ -46,7 +46,7 @@
   source_maps: 0.10.4 # TRANSITIVE DEPENDENCY
   source_span: 1.4.0 # TRANSITIVE DEPENDENCY
   stack_trace: 1.9.1 # TRANSITIVE DEPENDENCY
-  stream_channel: 1.6.2 # TRANSITIVE DEPENDENCY
+  stream_channel: 1.6.3 # TRANSITIVE DEPENDENCY
   string_scanner: 1.0.2 # TRANSITIVE DEPENDENCY
   term_glyph: 1.0.0 # TRANSITIVE DEPENDENCY
   test: 0.12.26 # TRANSITIVE DEPENDENCY
diff --git a/dev/bots/prepare_package.dart b/dev/bots/prepare_package.dart
index b9621cc..a444f06 100644
--- a/dev/bots/prepare_package.dart
+++ b/dev/bots/prepare_package.dart
@@ -2,15 +2,20 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+import 'dart:async';
 import 'dart:convert';
 import 'dart:io';
+import 'dart:typed_data';
 
 import 'package:args/args.dart';
 import 'package:path/path.dart' as path;
+import 'package:http/http.dart' as http;
 
 const String CHROMIUM_REPO =
     'https://chromium.googlesource.com/external/github.com/flutter/flutter';
 const String GITHUB_REPO = 'https://github.com/flutter/flutter.git';
+const String MINGIT_FOR_WINDOWS_URL = 'https://storage.googleapis.com/flutter_infra/mingit/'
+  '603511c649b00bbef0a6122a827ac419b656bc19/mingit.zip';
 
 /// The type of the process runner function.  This allows us to
 /// inject a fake process runner into the ArchiveCreator for tests.
@@ -39,16 +44,16 @@
 
 /// Creates a pre-populated Flutter archive from a git repo.
 class ArchiveCreator {
-  /// [tempDir] is the directory to use for creating the archive.  Will place
+  /// [tmpDir] is the directory to use for creating the archive.  Will place
   /// several GiB of data there, so it should have available space.
   /// [outputFile] is the name of the output archive. It should end in either
   /// ".tar.xz" or ".zip".
   /// The runner argument is used to inject a mock of [Process.runSync] for
   /// testing purposes.
-  ArchiveCreator(this.tempDir, this.outputFile, {ProcessRunner runner})
+  ArchiveCreator(this.tmpDir, this.outputFile, {ProcessRunner runner})
       : assert(outputFile.path.toLowerCase().endsWith('.zip') ||
             outputFile.path.toLowerCase().endsWith('.tar.xz')),
-        flutterRoot = new Directory(path.join(tempDir.path, 'flutter')),
+        flutterRoot = new Directory(path.join(tmpDir.path, 'flutter')),
         _runner = runner ?? Process.runSync {
     flutter = path.join(
       flutterRoot.absolute.path,
@@ -60,22 +65,31 @@
   }
 
   final Directory flutterRoot;
-  final Directory tempDir;
+  final Directory tmpDir;
   final File outputFile;
   final ProcessRunner _runner;
   String flutter;
   final String git = Platform.isWindows ? 'git.bat' : 'git';
   final String zip = Platform.isWindows ? '7za.exe' : 'zip';
   final String tar = Platform.isWindows ? 'tar.exe' : 'tar';
+  final Uri minGitUri = Uri.parse(MINGIT_FOR_WINDOWS_URL);
   Map<String, String> environment;
 
+  /// Performs all of the steps needed to create an archive.
+  Future<Null> createArchive(String revision) async {
+    checkoutFlutter(revision);
+    await installMinGitIfNeeded();
+    populateCaches();
+    archiveFiles();
+  }
+
   /// Clone the Flutter repo and make sure that the git environment is sane
   /// for when the user will unpack it.
   void checkoutFlutter(String revision) {
     // We want the user to start out the in the 'master' branch instead of a
     // detached head. To do that, we need to make sure master points at the
     // desired revision.
-    runGit(<String>['clone', '-b', 'master', CHROMIUM_REPO], workingDirectory: tempDir);
+    runGit(<String>['clone', '-b', 'master', CHROMIUM_REPO], workingDirectory: tmpDir);
     runGit(<String>['reset', '--hard', revision]);
 
     // Make the origin point to github instead of the chromium mirror.
@@ -83,19 +97,34 @@
     runGit(<String>['remote', 'add', 'origin', GITHUB_REPO]);
   }
 
+  /// Retrieve the MinGit executable from storage and unpack it.
+  Future<Null> installMinGitIfNeeded() async {
+    if (!Platform.isWindows) {
+      return;
+    }
+    final Uint8List data = await http.readBytes(minGitUri);
+    final File gitFile = new File(path.join(tmpDir.path, 'mingit.zip'));
+    await gitFile.open(mode: FileMode.WRITE);
+    await gitFile.writeAsBytes(data);
+
+    final Directory minGitPath = new Directory(path.join(flutterRoot.path, 'bin', 'mingit'));
+    await minGitPath.create(recursive: true);
+    unzipArchive(gitFile, currentDirectory: minGitPath);
+  }
+
   /// Prepare the archive repo so that it has all of the caches warmed up and
   /// is configured for the user to being working.
-  void prepareArchive() {
+  void populateCaches() {
     runFlutter(<String>['doctor']);
     runFlutter(<String>['update-packages']);
     runFlutter(<String>['precache']);
     runFlutter(<String>['ide-config']);
 
-    // Create each of the templates, since they will call pub get on
+    // Create each of the templates, since they will call 'pub get' on
     // themselves when created, and this will warm the cache with their
     // dependencies too.
     for (String template in <String>['app', 'package', 'plugin']) {
-      final String createName = path.join(tempDir.path, 'create_$template');
+      final String createName = path.join(tmpDir.path, 'create_$template');
       runFlutter(
         <String>['create', '--template=$template', createName],
       );
@@ -108,7 +137,7 @@
   }
 
   /// Create the archive into the given output file.
-  void createArchive() {
+  void archiveFiles() {
     if (outputFile.path.toLowerCase().endsWith('.zip')) {
       createZipArchive(outputFile, flutterRoot);
     } else if (outputFile.path.toLowerCase().endsWith('.tar.xz')) {
@@ -153,13 +182,27 @@
     return _runProcess(git, args, workingDirectory: workingDirectory);
   }
 
+  void unzipArchive(File archive, {Directory currentDirectory}) {
+    currentDirectory ??= new Directory(path.dirname(archive.absolute.path));
+    final List<String> args = <String>[];
+    String executable;
+    if (zip == 'zip') {
+      executable = 'unzip';
+    } else {
+      executable = zip;
+      args.addAll(<String>['x']);
+    }
+    args.add(archive.absolute.path);
+
+    _runProcess(executable, args, workingDirectory: currentDirectory);
+  }
+
   void createZipArchive(File output, Directory source) {
     final List<String> args = <String>[];
-    if (Platform.isWindows) {
-      // We use 7-Zip on Windows, which has different args.
-      args.addAll(<String>['a', '-tzip', '-mx=9']);
-    } else {
+    if (zip == 'zip') {
       args.addAll(<String>['-r', '-9', '-q']);
+    } else {
+      args.addAll(<String>['a', '-tzip', '-mx=9']);
     }
     args.addAll(<String>[
       output.absolute.path,
@@ -185,7 +228,12 @@
 /// It mainly serves to populate the .pub-cache with any appropriate Dart
 /// packages, and the flutter cache in bin/cache with the appropriate
 /// dependencies and snapshots.
-void main(List<String> argList) {
+///
+/// Note that archives contain the executables and customizations for the
+/// platform that they are created on.  So, for instance, a ZIP archive
+/// created on a Mac will contain Mac executables and setup, even though
+/// it's in a zip file.
+Future<Null> main(List<String> argList) async {
   final ArgParser argParser = new ArgParser();
   argParser.addOption(
     'temp_dir',
@@ -249,9 +297,7 @@
   int exitCode = 0;
   String message;
   try {
-    preparer.checkoutFlutter(args['revision']);
-    preparer.prepareArchive();
-    preparer.createArchive();
+    await preparer.createArchive(args['revision']);
   } on ProcessFailedException catch (e) {
     exitCode = e.exitCode;
     message = e.message;
@@ -266,4 +312,5 @@
     }
     exit(0);
   }
+  return new Future<Null>.value();
 }
diff --git a/dev/bots/pubspec.yaml b/dev/bots/pubspec.yaml
index 1ec0702..91ef26b 100644
--- a/dev/bots/pubspec.yaml
+++ b/dev/bots/pubspec.yaml
@@ -2,12 +2,13 @@
 description: Scripts which run on bots.
 
 dependencies:
-  path: 1.5.1
   args: 0.13.7
+  http: 0.11.3+14
+  path: 1.5.1
 
 dev_dependencies:
-  test: 0.12.26
   mockito: 2.2.1
+  test: 0.12.26
 
   async: 1.13.3 # TRANSITIVE DEPENDENCY
   barback: 0.15.2+13 # TRANSITIVE DEPENDENCY
@@ -17,7 +18,6 @@
   convert: 2.0.1 # TRANSITIVE DEPENDENCY
   crypto: 2.0.2+1 # TRANSITIVE DEPENDENCY
   glob: 1.1.5 # TRANSITIVE DEPENDENCY
-  http: 0.11.3+14 # TRANSITIVE DEPENDENCY
   http_multi_server: 2.0.4 # TRANSITIVE DEPENDENCY
   http_parser: 3.1.1 # TRANSITIVE DEPENDENCY
   io: 0.3.1 # TRANSITIVE DEPENDENCY
@@ -38,7 +38,7 @@
   source_maps: 0.10.4 # TRANSITIVE DEPENDENCY
   source_span: 1.4.0 # TRANSITIVE DEPENDENCY
   stack_trace: 1.9.1 # TRANSITIVE DEPENDENCY
-  stream_channel: 1.6.2 # TRANSITIVE DEPENDENCY
+  stream_channel: 1.6.3 # TRANSITIVE DEPENDENCY
   string_scanner: 1.0.2 # TRANSITIVE DEPENDENCY
   term_glyph: 1.0.0 # TRANSITIVE DEPENDENCY
   typed_data: 1.1.4 # TRANSITIVE DEPENDENCY
diff --git a/dev/bots/test/prepare_package_test.dart b/dev/bots/test/prepare_package_test.dart
index 2cfe44b..2f206dd 100644
--- a/dev/bots/test/prepare_package_test.dart
+++ b/dev/bots/test/prepare_package_test.dart
@@ -62,7 +62,12 @@
     });
 
     tearDown(() async {
-      await tmpDir.delete(recursive: true);
+      // On Windows, the directory is locked and not able to be deleted, because it is a
+      // temporary directory. So we just leave some (very small, because we're not actually
+      // building archives here) trash around to be deleted at the next reboot.
+      if (!Platform.isWindows) {
+        await tmpDir.delete(recursive: true);
+      }
     });
 
     test('sets PUB_CACHE properly', () async {
@@ -70,9 +75,7 @@
       preparer = new ArchiveCreator(tmpDir, outputFile, runner: runner);
       _answerWithResults();
       results = <MockProcessResult>[new MockProcessResult('deadbeef\n', '', 0)];
-      preparer.checkoutFlutter('master');
-      preparer.prepareArchive();
-      preparer.createArchive();
+      await preparer.createArchive('master');
       expect(
         verify(runner.call(
           captureAny,
@@ -90,14 +93,17 @@
       preparer = new ArchiveCreator(tmpDir, outputFile, runner: runner);
       _answerWithResults();
       results = <MockProcessResult>[new MockProcessResult('deadbeef\n', '', 0)];
-      preparer.checkoutFlutter('master');
-      preparer.prepareArchive();
-      preparer.createArchive();
+      await preparer.createArchive('master');
       final List<String> commands = <String>[
         '$gitExe clone -b master https://chromium.googlesource.com/external/github.com/flutter/flutter',
         '$gitExe reset --hard master',
         '$gitExe remote remove origin',
         '$gitExe remote add origin https://github.com/flutter/flutter.git',
+      ];
+      if (Platform.isWindows) {
+        commands.add('$zipExe x ${path.join(tmpDir.path, 'mingit.zip')}');
+      }
+      commands.addAll(<String>[
         '$flutterExe doctor',
         '$flutterExe update-packages',
         '$flutterExe precache',
@@ -107,7 +113,7 @@
         '$flutterExe create --template=plugin ${path.join(tmpDir.path, 'create_plugin')}',
         '$gitExe clean -f -X **/.packages',
         '$tarExe cJf ${path.join(tmpDir.path, 'flutter_master.tar.xz')} flutter',
-      ];
+      ]);
       int step = 0;
       for (String command in commands) {
         _verifyCommand(args[step++], command);
@@ -119,14 +125,17 @@
       preparer = new ArchiveCreator(tmpDir, outputFile, runner: runner);
       _answerWithResults();
       results = <MockProcessResult>[new MockProcessResult('deadbeef\n', '', 0)];
-      preparer.checkoutFlutter('master');
-      preparer.prepareArchive();
-      preparer.createArchive();
+      await preparer.createArchive('master');
       final List<String> commands = <String>[
         '$gitExe clone -b master https://chromium.googlesource.com/external/github.com/flutter/flutter',
         '$gitExe reset --hard master',
         '$gitExe remote remove origin',
         '$gitExe remote add origin https://github.com/flutter/flutter.git',
+      ];
+      if (Platform.isWindows) {
+        commands.add('$zipExe x ${path.join(tmpDir.path, 'mingit.zip')}');
+      }
+      commands.addAll(<String>[
         '$flutterExe doctor',
         '$flutterExe update-packages',
         '$flutterExe precache',
@@ -135,7 +144,7 @@
         '$flutterExe create --template=package ${path.join(tmpDir.path, 'create_package')}',
         '$flutterExe create --template=plugin ${path.join(tmpDir.path, 'create_plugin')}',
         '$gitExe clean -f -X **/.packages',
-      ];
+      ]);
       if (Platform.isWindows) {
         commands.add('$zipExe a -tzip -mx=9 ${path.join(tmpDir.path, 'flutter_master.zip')} flutter');
       } else {
diff --git a/dev/devicelab/pubspec.yaml b/dev/devicelab/pubspec.yaml
index 63e8c4a..dc6c00d 100644
--- a/dev/devicelab/pubspec.yaml
+++ b/dev/devicelab/pubspec.yaml
@@ -44,7 +44,7 @@
   node_preamble: 1.4.0 # TRANSITIVE DEPENDENCY
   package_config: 1.0.3 # TRANSITIVE DEPENDENCY
   package_resolver: 1.0.2 # TRANSITIVE DEPENDENCY
-  petitparser: 1.6.1 # TRANSITIVE DEPENDENCY
+  petitparser: 1.7.0 # TRANSITIVE DEPENDENCY
   pool: 1.3.3 # TRANSITIVE DEPENDENCY
   pub_semver: 1.3.2 # TRANSITIVE DEPENDENCY
   shelf: 0.7.1 # TRANSITIVE DEPENDENCY
@@ -54,7 +54,7 @@
   source_map_stack_trace: 1.1.4 # TRANSITIVE DEPENDENCY
   source_maps: 0.10.4 # TRANSITIVE DEPENDENCY
   source_span: 1.4.0 # TRANSITIVE DEPENDENCY
-  stream_channel: 1.6.2 # TRANSITIVE DEPENDENCY
+  stream_channel: 1.6.3 # TRANSITIVE DEPENDENCY
   string_scanner: 1.0.2 # TRANSITIVE DEPENDENCY
   term_glyph: 1.0.0 # TRANSITIVE DEPENDENCY
   typed_data: 1.1.4 # TRANSITIVE DEPENDENCY
diff --git a/dev/integration_tests/channels/pubspec.yaml b/dev/integration_tests/channels/pubspec.yaml
index 584d947..90f394c 100644
--- a/dev/integration_tests/channels/pubspec.yaml
+++ b/dev/integration_tests/channels/pubspec.yaml
@@ -43,7 +43,7 @@
   source_maps: 0.10.4 # TRANSITIVE DEPENDENCY
   source_span: 1.4.0 # TRANSITIVE DEPENDENCY
   stack_trace: 1.9.1 # TRANSITIVE DEPENDENCY
-  stream_channel: 1.6.2 # TRANSITIVE DEPENDENCY
+  stream_channel: 1.6.3 # TRANSITIVE DEPENDENCY
   string_scanner: 1.0.2 # TRANSITIVE DEPENDENCY
   term_glyph: 1.0.0 # TRANSITIVE DEPENDENCY
   test: 0.12.26 # TRANSITIVE DEPENDENCY
diff --git a/dev/integration_tests/external_ui/pubspec.yaml b/dev/integration_tests/external_ui/pubspec.yaml
index fbd5951..34c36c9 100644
--- a/dev/integration_tests/external_ui/pubspec.yaml
+++ b/dev/integration_tests/external_ui/pubspec.yaml
@@ -43,7 +43,7 @@
   source_maps: 0.10.4 # TRANSITIVE DEPENDENCY
   source_span: 1.4.0 # TRANSITIVE DEPENDENCY
   stack_trace: 1.9.1 # TRANSITIVE DEPENDENCY
-  stream_channel: 1.6.2 # TRANSITIVE DEPENDENCY
+  stream_channel: 1.6.3 # TRANSITIVE DEPENDENCY
   string_scanner: 1.0.2 # TRANSITIVE DEPENDENCY
   term_glyph: 1.0.0 # TRANSITIVE DEPENDENCY
   test: 0.12.26 # TRANSITIVE DEPENDENCY
diff --git a/dev/integration_tests/flavors/pubspec.yaml b/dev/integration_tests/flavors/pubspec.yaml
index 038343a..4b911dd 100644
--- a/dev/integration_tests/flavors/pubspec.yaml
+++ b/dev/integration_tests/flavors/pubspec.yaml
@@ -43,7 +43,7 @@
   source_maps: 0.10.4 # TRANSITIVE DEPENDENCY
   source_span: 1.4.0 # TRANSITIVE DEPENDENCY
   stack_trace: 1.9.1 # TRANSITIVE DEPENDENCY
-  stream_channel: 1.6.2 # TRANSITIVE DEPENDENCY
+  stream_channel: 1.6.3 # TRANSITIVE DEPENDENCY
   string_scanner: 1.0.2 # TRANSITIVE DEPENDENCY
   term_glyph: 1.0.0 # TRANSITIVE DEPENDENCY
   test: 0.12.26 # TRANSITIVE DEPENDENCY
diff --git a/dev/integration_tests/platform_interaction/pubspec.yaml b/dev/integration_tests/platform_interaction/pubspec.yaml
index 7ec53dc..ad08e63 100644
--- a/dev/integration_tests/platform_interaction/pubspec.yaml
+++ b/dev/integration_tests/platform_interaction/pubspec.yaml
@@ -43,7 +43,7 @@
   source_maps: 0.10.4 # TRANSITIVE DEPENDENCY
   source_span: 1.4.0 # TRANSITIVE DEPENDENCY
   stack_trace: 1.9.1 # TRANSITIVE DEPENDENCY
-  stream_channel: 1.6.2 # TRANSITIVE DEPENDENCY
+  stream_channel: 1.6.3 # TRANSITIVE DEPENDENCY
   string_scanner: 1.0.2 # TRANSITIVE DEPENDENCY
   term_glyph: 1.0.0 # TRANSITIVE DEPENDENCY
   test: 0.12.26 # TRANSITIVE DEPENDENCY
diff --git a/dev/integration_tests/ui/pubspec.yaml b/dev/integration_tests/ui/pubspec.yaml
index 6dc6224..2c47cf5 100644
--- a/dev/integration_tests/ui/pubspec.yaml
+++ b/dev/integration_tests/ui/pubspec.yaml
@@ -40,7 +40,7 @@
   package_config: 1.0.3 # TRANSITIVE DEPENDENCY
   package_resolver: 1.0.2 # TRANSITIVE DEPENDENCY
   path: 1.5.1 # TRANSITIVE DEPENDENCY
-  petitparser: 1.6.1 # TRANSITIVE DEPENDENCY
+  petitparser: 1.7.0 # TRANSITIVE DEPENDENCY
   pool: 1.3.3 # TRANSITIVE DEPENDENCY
   pub_semver: 1.3.2 # TRANSITIVE DEPENDENCY
   quiver: 0.26.2 # TRANSITIVE DEPENDENCY
@@ -52,7 +52,7 @@
   source_maps: 0.10.4 # TRANSITIVE DEPENDENCY
   source_span: 1.4.0 # TRANSITIVE DEPENDENCY
   stack_trace: 1.9.1 # TRANSITIVE DEPENDENCY
-  stream_channel: 1.6.2 # TRANSITIVE DEPENDENCY
+  stream_channel: 1.6.3 # TRANSITIVE DEPENDENCY
   string_scanner: 1.0.2 # TRANSITIVE DEPENDENCY
   term_glyph: 1.0.0 # TRANSITIVE DEPENDENCY
   typed_data: 1.1.4 # TRANSITIVE DEPENDENCY
diff --git a/dev/manual_tests/pubspec.yaml b/dev/manual_tests/pubspec.yaml
index 4bba5ae..60a4b15 100644
--- a/dev/manual_tests/pubspec.yaml
+++ b/dev/manual_tests/pubspec.yaml
@@ -41,7 +41,7 @@
   source_maps: 0.10.4 # TRANSITIVE DEPENDENCY
   source_span: 1.4.0 # TRANSITIVE DEPENDENCY
   stack_trace: 1.9.1 # TRANSITIVE DEPENDENCY
-  stream_channel: 1.6.2 # TRANSITIVE DEPENDENCY
+  stream_channel: 1.6.3 # TRANSITIVE DEPENDENCY
   string_scanner: 1.0.2 # TRANSITIVE DEPENDENCY
   term_glyph: 1.0.0 # TRANSITIVE DEPENDENCY
   test: 0.12.26 # TRANSITIVE DEPENDENCY
diff --git a/examples/catalog/pubspec.yaml b/examples/catalog/pubspec.yaml
index c768892..bffb633 100644
--- a/examples/catalog/pubspec.yaml
+++ b/examples/catalog/pubspec.yaml
@@ -46,7 +46,7 @@
   source_maps: 0.10.4 # TRANSITIVE DEPENDENCY
   source_span: 1.4.0 # TRANSITIVE DEPENDENCY
   stack_trace: 1.9.1 # TRANSITIVE DEPENDENCY
-  stream_channel: 1.6.2 # TRANSITIVE DEPENDENCY
+  stream_channel: 1.6.3 # TRANSITIVE DEPENDENCY
   string_scanner: 1.0.2 # TRANSITIVE DEPENDENCY
   term_glyph: 1.0.0 # TRANSITIVE DEPENDENCY
   test: 0.12.26 # TRANSITIVE DEPENDENCY
diff --git a/examples/flutter_gallery/pubspec.yaml b/examples/flutter_gallery/pubspec.yaml
index 5054b5c..d45018a 100644
--- a/examples/flutter_gallery/pubspec.yaml
+++ b/examples/flutter_gallery/pubspec.yaml
@@ -3,11 +3,11 @@
   flutter:
     sdk: flutter
   collection: 1.14.3
-  device_info: 0.0.5
+  device_info: 0.1.0
   intl: 0.15.2
-  connectivity: 0.1.1
+  connectivity: 0.2.0
   string_scanner: 1.0.2
-  url_launcher: 1.0.3
+  url_launcher: 2.0.0
   cupertino_icons: 0.1.1
   video_player: 0.0.6
 
@@ -57,7 +57,7 @@
   source_maps: 0.10.4 # TRANSITIVE DEPENDENCY
   source_span: 1.4.0 # TRANSITIVE DEPENDENCY
   stack_trace: 1.9.1 # TRANSITIVE DEPENDENCY
-  stream_channel: 1.6.2 # TRANSITIVE DEPENDENCY
+  stream_channel: 1.6.3 # TRANSITIVE DEPENDENCY
   term_glyph: 1.0.0 # TRANSITIVE DEPENDENCY
   test: 0.12.26 # TRANSITIVE DEPENDENCY
   typed_data: 1.1.4 # TRANSITIVE DEPENDENCY
diff --git a/examples/flutter_view/pubspec.yaml b/examples/flutter_view/pubspec.yaml
index c9f10aa..f0af6dd 100644
--- a/examples/flutter_view/pubspec.yaml
+++ b/examples/flutter_view/pubspec.yaml
@@ -37,7 +37,7 @@
   source_maps: 0.10.4 # TRANSITIVE DEPENDENCY
   source_span: 1.4.0 # TRANSITIVE DEPENDENCY
   stack_trace: 1.9.1 # TRANSITIVE DEPENDENCY
-  stream_channel: 1.6.2 # TRANSITIVE DEPENDENCY
+  stream_channel: 1.6.3 # TRANSITIVE DEPENDENCY
   string_scanner: 1.0.2 # TRANSITIVE DEPENDENCY
   term_glyph: 1.0.0 # TRANSITIVE DEPENDENCY
   test: 0.12.26 # TRANSITIVE DEPENDENCY
diff --git a/examples/hello_world/pubspec.yaml b/examples/hello_world/pubspec.yaml
index 58c6cbe..77db3a1 100644
--- a/examples/hello_world/pubspec.yaml
+++ b/examples/hello_world/pubspec.yaml
@@ -41,7 +41,7 @@
   source_maps: 0.10.4 # TRANSITIVE DEPENDENCY
   source_span: 1.4.0 # TRANSITIVE DEPENDENCY
   stack_trace: 1.9.1 # TRANSITIVE DEPENDENCY
-  stream_channel: 1.6.2 # TRANSITIVE DEPENDENCY
+  stream_channel: 1.6.3 # TRANSITIVE DEPENDENCY
   string_scanner: 1.0.2 # TRANSITIVE DEPENDENCY
   term_glyph: 1.0.0 # TRANSITIVE DEPENDENCY
   test: 0.12.26 # TRANSITIVE DEPENDENCY
diff --git a/examples/layers/pubspec.yaml b/examples/layers/pubspec.yaml
index 3602e56..2cb0c17 100644
--- a/examples/layers/pubspec.yaml
+++ b/examples/layers/pubspec.yaml
@@ -40,7 +40,7 @@
   source_maps: 0.10.4 # TRANSITIVE DEPENDENCY
   source_span: 1.4.0 # TRANSITIVE DEPENDENCY
   stack_trace: 1.9.1 # TRANSITIVE DEPENDENCY
-  stream_channel: 1.6.2 # TRANSITIVE DEPENDENCY
+  stream_channel: 1.6.3 # TRANSITIVE DEPENDENCY
   string_scanner: 1.0.2 # TRANSITIVE DEPENDENCY
   term_glyph: 1.0.0 # TRANSITIVE DEPENDENCY
   test: 0.12.26 # TRANSITIVE DEPENDENCY
diff --git a/examples/platform_channel/pubspec.yaml b/examples/platform_channel/pubspec.yaml
index 0b9d6f7..7141065 100644
--- a/examples/platform_channel/pubspec.yaml
+++ b/examples/platform_channel/pubspec.yaml
@@ -46,7 +46,7 @@
   source_maps: 0.10.4 # TRANSITIVE DEPENDENCY
   source_span: 1.4.0 # TRANSITIVE DEPENDENCY
   stack_trace: 1.9.1 # TRANSITIVE DEPENDENCY
-  stream_channel: 1.6.2 # TRANSITIVE DEPENDENCY
+  stream_channel: 1.6.3 # TRANSITIVE DEPENDENCY
   string_scanner: 1.0.2 # TRANSITIVE DEPENDENCY
   term_glyph: 1.0.0 # TRANSITIVE DEPENDENCY
   test: 0.12.26 # TRANSITIVE DEPENDENCY
diff --git a/examples/platform_channel_swift/pubspec.yaml b/examples/platform_channel_swift/pubspec.yaml
index dc4e898..de97cd0 100644
--- a/examples/platform_channel_swift/pubspec.yaml
+++ b/examples/platform_channel_swift/pubspec.yaml
@@ -46,7 +46,7 @@
   source_maps: 0.10.4 # TRANSITIVE DEPENDENCY
   source_span: 1.4.0 # TRANSITIVE DEPENDENCY
   stack_trace: 1.9.1 # TRANSITIVE DEPENDENCY
-  stream_channel: 1.6.2 # TRANSITIVE DEPENDENCY
+  stream_channel: 1.6.3 # TRANSITIVE DEPENDENCY
   string_scanner: 1.0.2 # TRANSITIVE DEPENDENCY
   term_glyph: 1.0.0 # TRANSITIVE DEPENDENCY
   test: 0.12.26 # TRANSITIVE DEPENDENCY
diff --git a/examples/platform_view/pubspec.yaml b/examples/platform_view/pubspec.yaml
index 89fd65a..285b9c0 100644
--- a/examples/platform_view/pubspec.yaml
+++ b/examples/platform_view/pubspec.yaml
@@ -36,7 +36,7 @@
   source_maps: 0.10.4 # TRANSITIVE DEPENDENCY
   source_span: 1.4.0 # TRANSITIVE DEPENDENCY
   stack_trace: 1.9.1 # TRANSITIVE DEPENDENCY
-  stream_channel: 1.6.2 # TRANSITIVE DEPENDENCY
+  stream_channel: 1.6.3 # TRANSITIVE DEPENDENCY
   string_scanner: 1.0.2 # TRANSITIVE DEPENDENCY
   term_glyph: 1.0.0 # TRANSITIVE DEPENDENCY
   test: 0.12.26 # TRANSITIVE DEPENDENCY
diff --git a/examples/stocks/pubspec.yaml b/examples/stocks/pubspec.yaml
index 10c3bb5..1bfdeaf 100644
--- a/examples/stocks/pubspec.yaml
+++ b/examples/stocks/pubspec.yaml
@@ -39,7 +39,7 @@
   package_config: 1.0.3 # TRANSITIVE DEPENDENCY
   package_resolver: 1.0.2 # TRANSITIVE DEPENDENCY
   path: 1.5.1 # TRANSITIVE DEPENDENCY
-  petitparser: 1.6.1 # TRANSITIVE DEPENDENCY
+  petitparser: 1.7.0 # TRANSITIVE DEPENDENCY
   pool: 1.3.3 # TRANSITIVE DEPENDENCY
   pub_semver: 1.3.2 # TRANSITIVE DEPENDENCY
   quiver: 0.26.2 # TRANSITIVE DEPENDENCY
@@ -51,7 +51,7 @@
   source_maps: 0.10.4 # TRANSITIVE DEPENDENCY
   source_span: 1.4.0 # TRANSITIVE DEPENDENCY
   stack_trace: 1.9.1 # TRANSITIVE DEPENDENCY
-  stream_channel: 1.6.2 # TRANSITIVE DEPENDENCY
+  stream_channel: 1.6.3 # TRANSITIVE DEPENDENCY
   string_scanner: 1.0.2 # TRANSITIVE DEPENDENCY
   term_glyph: 1.0.0 # TRANSITIVE DEPENDENCY
   test: 0.12.26 # TRANSITIVE DEPENDENCY
diff --git a/packages/flutter/pubspec.yaml b/packages/flutter/pubspec.yaml
index da998bf..3103621 100644
--- a/packages/flutter/pubspec.yaml
+++ b/packages/flutter/pubspec.yaml
@@ -49,7 +49,7 @@
   source_maps: 0.10.4 # TRANSITIVE DEPENDENCY
   source_span: 1.4.0 # TRANSITIVE DEPENDENCY
   stack_trace: 1.9.1 # TRANSITIVE DEPENDENCY
-  stream_channel: 1.6.2 # TRANSITIVE DEPENDENCY
+  stream_channel: 1.6.3 # TRANSITIVE DEPENDENCY
   string_scanner: 1.0.2 # TRANSITIVE DEPENDENCY
   term_glyph: 1.0.0 # TRANSITIVE DEPENDENCY
   test: 0.12.26 # TRANSITIVE DEPENDENCY
diff --git a/packages/flutter_driver/pubspec.yaml b/packages/flutter_driver/pubspec.yaml
index 7f96811..cb3ec0d 100644
--- a/packages/flutter_driver/pubspec.yaml
+++ b/packages/flutter_driver/pubspec.yaml
@@ -54,7 +54,7 @@
   source_maps: 0.10.4 # TRANSITIVE DEPENDENCY
   source_span: 1.4.0 # TRANSITIVE DEPENDENCY
   stack_trace: 1.9.1 # TRANSITIVE DEPENDENCY
-  stream_channel: 1.6.2 # TRANSITIVE DEPENDENCY
+  stream_channel: 1.6.3 # TRANSITIVE DEPENDENCY
   string_scanner: 1.0.2 # TRANSITIVE DEPENDENCY
   term_glyph: 1.0.0 # TRANSITIVE DEPENDENCY
   typed_data: 1.1.4 # TRANSITIVE DEPENDENCY
diff --git a/packages/flutter_localizations/pubspec.yaml b/packages/flutter_localizations/pubspec.yaml
index 25b4d60..4a39a1b 100644
--- a/packages/flutter_localizations/pubspec.yaml
+++ b/packages/flutter_localizations/pubspec.yaml
@@ -44,7 +44,7 @@
   source_maps: 0.10.4 # TRANSITIVE DEPENDENCY
   source_span: 1.4.0 # TRANSITIVE DEPENDENCY
   stack_trace: 1.9.1 # TRANSITIVE DEPENDENCY
-  stream_channel: 1.6.2 # TRANSITIVE DEPENDENCY
+  stream_channel: 1.6.3 # TRANSITIVE DEPENDENCY
   string_scanner: 1.0.2 # TRANSITIVE DEPENDENCY
   term_glyph: 1.0.0 # TRANSITIVE DEPENDENCY
   test: 0.12.26 # TRANSITIVE DEPENDENCY
diff --git a/packages/flutter_test/pubspec.yaml b/packages/flutter_test/pubspec.yaml
index 0022869..3ebc5f7 100644
--- a/packages/flutter_test/pubspec.yaml
+++ b/packages/flutter_test/pubspec.yaml
@@ -55,7 +55,7 @@
   source_map_stack_trace: 1.1.4 # TRANSITIVE DEPENDENCY
   source_maps: 0.10.4 # TRANSITIVE DEPENDENCY
   source_span: 1.4.0 # TRANSITIVE DEPENDENCY
-  stream_channel: 1.6.2 # TRANSITIVE DEPENDENCY
+  stream_channel: 1.6.3 # TRANSITIVE DEPENDENCY
   string_scanner: 1.0.2 # TRANSITIVE DEPENDENCY
   term_glyph: 1.0.0 # TRANSITIVE DEPENDENCY
   typed_data: 1.1.4 # TRANSITIVE DEPENDENCY
diff --git a/packages/flutter_tools/pubspec.yaml b/packages/flutter_tools/pubspec.yaml
index 3146f34..ef36782 100644
--- a/packages/flutter_tools/pubspec.yaml
+++ b/packages/flutter_tools/pubspec.yaml
@@ -17,7 +17,7 @@
   http: 0.11.3+14
   intl: 0.15.2
   json_rpc_2: 2.0.4
-  json_schema: 1.0.6
+  json_schema: 1.0.7
   linter: 0.1.41
   meta: 1.1.1
   mustache: 1.0.0
@@ -27,7 +27,7 @@
   process: 2.0.6
   quiver: 0.26.2
   stack_trace: 1.9.1
-  stream_channel: 1.6.2
+  stream_channel: 1.6.3
   usage: 3.3.0
   vm_service_client: 0.2.3
   web_socket_channel: 1.0.6
@@ -66,7 +66,7 @@
   node_preamble: 1.4.0 # TRANSITIVE DEPENDENCY
   package_resolver: 1.0.2 # TRANSITIVE DEPENDENCY
   path: 1.5.1 # TRANSITIVE DEPENDENCY
-  petitparser: 1.6.1 # TRANSITIVE DEPENDENCY
+  petitparser: 1.7.0 # TRANSITIVE DEPENDENCY
   pool: 1.3.3 # TRANSITIVE DEPENDENCY
   pub_semver: 1.3.2 # TRANSITIVE DEPENDENCY
   shelf: 0.7.1 # TRANSITIVE DEPENDENCY