mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00

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.
50 lines
1.4 KiB
Dart
50 lines
1.4 KiB
Dart
// Copyright 2014 The Flutter Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
import 'package:flutter_tools/src/base/io.dart';
|
|
import 'package:flutter_tools/src/dart/pub.dart';
|
|
|
|
class ThrowingPub implements Pub {
|
|
@override
|
|
Future<void> batch(List<String> arguments, {
|
|
PubContext? context,
|
|
String? directory,
|
|
MessageFilter? filter,
|
|
String? failureMessage = 'pub failed',
|
|
bool? retry,
|
|
bool? showTraceForErrors,
|
|
}) {
|
|
throw UnsupportedError('Attempted to invoke pub during test.');
|
|
}
|
|
|
|
@override
|
|
Future<void> get({
|
|
PubContext? context,
|
|
String? directory,
|
|
bool skipIfAbsent = false,
|
|
bool upgrade = false,
|
|
bool offline = false,
|
|
bool checkLastModified = true,
|
|
bool skipPubspecYamlCheck = false,
|
|
bool generateSyntheticPackage = false,
|
|
String? flutterRootOverride,
|
|
bool checkUpToDate = false,
|
|
bool shouldSkipThirdPartyGenerator = true,
|
|
bool printProgress = true,
|
|
}) {
|
|
throw UnsupportedError('Attempted to invoke pub during test.');
|
|
}
|
|
|
|
@override
|
|
Future<void> interactively(
|
|
List<String> arguments, {
|
|
String? directory,
|
|
required Stdio stdio,
|
|
bool touchesPackageConfig = false,
|
|
bool generateSyntheticPackage = false,
|
|
}) {
|
|
throw UnsupportedError('Attempted to invoke pub during test.');
|
|
}
|
|
}
|