Reland1: "Revert "Add and plumb useImplicitPubspecResolution
across flutter_tools
."" (#158126)
Reverts flutter/flutter#158076
This commit is contained in:
parent
49a16fccd1
commit
04d3d1a4c3
@ -34,7 +34,7 @@ const List<String> _kRequiredOptions = <String>[
|
|||||||
Future<void> main(List<String> args) {
|
Future<void> main(List<String> args) {
|
||||||
return runInContext<void>(() => run(args), overrides: <Type, Generator>{
|
return runInContext<void>(() => run(args), overrides: <Type, Generator>{
|
||||||
Usage: () => DisabledUsage(),
|
Usage: () => DisabledUsage(),
|
||||||
});
|
}, useImplicitPubspecResolution: true);
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> writeAssetFile(libfs.File outputFile, AssetBundleEntry asset) async {
|
Future<void> writeAssetFile(libfs.File outputFile, AssetBundleEntry asset) async {
|
||||||
|
@ -43,7 +43,7 @@ const String _kOptionCoveragePath = 'coverage-path';
|
|||||||
void main(List<String> args) {
|
void main(List<String> args) {
|
||||||
runInContext<void>(() => run(args), overrides: <Type, Generator>{
|
runInContext<void>(() => run(args), overrides: <Type, Generator>{
|
||||||
Usage: () => DisabledUsage(),
|
Usage: () => DisabledUsage(),
|
||||||
});
|
}, useImplicitPubspecResolution: true);
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> run(List<String> args) async {
|
Future<void> run(List<String> args) async {
|
||||||
|
@ -347,6 +347,7 @@ class Environment {
|
|||||||
required Analytics analytics,
|
required Analytics analytics,
|
||||||
String? engineVersion,
|
String? engineVersion,
|
||||||
required bool generateDartPluginRegistry,
|
required bool generateDartPluginRegistry,
|
||||||
|
required bool useImplicitPubspecResolution,
|
||||||
Directory? buildDir,
|
Directory? buildDir,
|
||||||
Map<String, String> defines = const <String, String>{},
|
Map<String, String> defines = const <String, String>{},
|
||||||
Map<String, String> inputs = const <String, String>{},
|
Map<String, String> inputs = const <String, String>{},
|
||||||
@ -391,6 +392,7 @@ class Environment {
|
|||||||
engineVersion: engineVersion,
|
engineVersion: engineVersion,
|
||||||
inputs: inputs,
|
inputs: inputs,
|
||||||
generateDartPluginRegistry: generateDartPluginRegistry,
|
generateDartPluginRegistry: generateDartPluginRegistry,
|
||||||
|
useImplicitPubspecResolution: useImplicitPubspecResolution,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -412,6 +414,7 @@ class Environment {
|
|||||||
Usage? usage,
|
Usage? usage,
|
||||||
Analytics? analytics,
|
Analytics? analytics,
|
||||||
bool generateDartPluginRegistry = false,
|
bool generateDartPluginRegistry = false,
|
||||||
|
bool useImplicitPubspecResolution = true,
|
||||||
required FileSystem fileSystem,
|
required FileSystem fileSystem,
|
||||||
required Logger logger,
|
required Logger logger,
|
||||||
required Artifacts artifacts,
|
required Artifacts artifacts,
|
||||||
@ -435,6 +438,7 @@ class Environment {
|
|||||||
analytics: analytics ?? const NoOpAnalytics(),
|
analytics: analytics ?? const NoOpAnalytics(),
|
||||||
engineVersion: engineVersion,
|
engineVersion: engineVersion,
|
||||||
generateDartPluginRegistry: generateDartPluginRegistry,
|
generateDartPluginRegistry: generateDartPluginRegistry,
|
||||||
|
useImplicitPubspecResolution: useImplicitPubspecResolution,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -457,6 +461,7 @@ class Environment {
|
|||||||
this.engineVersion,
|
this.engineVersion,
|
||||||
required this.inputs,
|
required this.inputs,
|
||||||
required this.generateDartPluginRegistry,
|
required this.generateDartPluginRegistry,
|
||||||
|
required this.useImplicitPubspecResolution,
|
||||||
});
|
});
|
||||||
|
|
||||||
/// The [Source] value which is substituted with the path to [projectDir].
|
/// The [Source] value which is substituted with the path to [projectDir].
|
||||||
@ -557,6 +562,10 @@ class Environment {
|
|||||||
/// the new entrypoint.
|
/// the new entrypoint.
|
||||||
final bool generateDartPluginRegistry;
|
final bool generateDartPluginRegistry;
|
||||||
|
|
||||||
|
/// Whether to generate a `.flutter-plugins` file and for Flutter i10n source
|
||||||
|
/// generation to default to `synthetic-package: true`.
|
||||||
|
final bool useImplicitPubspecResolution;
|
||||||
|
|
||||||
late final DepfileService depFileService = DepfileService(
|
late final DepfileService depFileService = DepfileService(
|
||||||
logger: logger,
|
logger: logger,
|
||||||
fileSystem: fileSystem,
|
fileSystem: fileSystem,
|
||||||
|
@ -56,6 +56,7 @@ class GenerateLocalizationsTarget extends Target {
|
|||||||
file: configFile,
|
file: configFile,
|
||||||
logger: environment.logger,
|
logger: environment.logger,
|
||||||
defaultArbDir: defaultArbDir,
|
defaultArbDir: defaultArbDir,
|
||||||
|
defaultSyntheticPackage: environment.useImplicitPubspecResolution,
|
||||||
);
|
);
|
||||||
await generateLocalizations(
|
await generateLocalizations(
|
||||||
logger: environment.logger,
|
logger: environment.logger,
|
||||||
|
@ -37,6 +37,7 @@ class BundleBuilder {
|
|||||||
Future<void> build({
|
Future<void> build({
|
||||||
required TargetPlatform platform,
|
required TargetPlatform platform,
|
||||||
required BuildInfo buildInfo,
|
required BuildInfo buildInfo,
|
||||||
|
required bool useImplicitPubspecResolution,
|
||||||
FlutterProject? project,
|
FlutterProject? project,
|
||||||
String? mainPath,
|
String? mainPath,
|
||||||
String manifestPath = defaultManifestPath,
|
String manifestPath = defaultManifestPath,
|
||||||
@ -79,6 +80,7 @@ class BundleBuilder {
|
|||||||
analytics: globals.analytics,
|
analytics: globals.analytics,
|
||||||
platform: globals.platform,
|
platform: globals.platform,
|
||||||
generateDartPluginRegistry: true,
|
generateDartPluginRegistry: true,
|
||||||
|
useImplicitPubspecResolution: useImplicitPubspecResolution,
|
||||||
);
|
);
|
||||||
final Target target = buildInfo.mode == BuildMode.debug
|
final Target target = buildInfo.mode == BuildMode.debug
|
||||||
? globals.buildTargets.copyFlutterBundle
|
? globals.buildTargets.copyFlutterBundle
|
||||||
|
@ -26,6 +26,7 @@ import '../globals.dart' as globals;
|
|||||||
import '../project.dart';
|
import '../project.dart';
|
||||||
import '../reporting/reporting.dart';
|
import '../reporting/reporting.dart';
|
||||||
import '../runner/flutter_command.dart';
|
import '../runner/flutter_command.dart';
|
||||||
|
import '../runner/flutter_command_runner.dart';
|
||||||
|
|
||||||
/// All currently implemented targets.
|
/// All currently implemented targets.
|
||||||
List<Target> _kDefaultTargets = <Target>[
|
List<Target> _kDefaultTargets = <Target>[
|
||||||
@ -252,6 +253,7 @@ class AssembleCommand extends FlutterCommand {
|
|||||||
? null
|
? null
|
||||||
: globals.flutterVersion.engineRevision,
|
: globals.flutterVersion.engineRevision,
|
||||||
generateDartPluginRegistry: true,
|
generateDartPluginRegistry: true,
|
||||||
|
useImplicitPubspecResolution: globalResults!.flag(FlutterGlobalOptions.kImplicitPubspecResolution),
|
||||||
);
|
);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
@ -280,6 +280,7 @@ known, it can be explicitly provided to attach via the command-line, e.g.
|
|||||||
? _logger
|
? _logger
|
||||||
: NotifyingLogger(verbose: _logger.isVerbose, parent: _logger),
|
: NotifyingLogger(verbose: _logger.isVerbose, parent: _logger),
|
||||||
logToStdout: true,
|
logToStdout: true,
|
||||||
|
useImplicitPubspecResolution: globalResults!.flag(FlutterGlobalOptions.kImplicitPubspecResolution),
|
||||||
)
|
)
|
||||||
: null;
|
: null;
|
||||||
|
|
||||||
@ -466,6 +467,7 @@ known, it can be explicitly provided to attach via the command-line, e.g.
|
|||||||
printDtd: boolArg(FlutterGlobalOptions.kPrintDtd, global: true),
|
printDtd: boolArg(FlutterGlobalOptions.kPrintDtd, global: true),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
final bool useImplicitPubspecResolution = globalResults!.flag(FlutterGlobalOptions.kImplicitPubspecResolution);
|
||||||
return buildInfo.isDebug
|
return buildInfo.isDebug
|
||||||
? _hotRunnerFactory.build(
|
? _hotRunnerFactory.build(
|
||||||
flutterDevices,
|
flutterDevices,
|
||||||
@ -478,11 +480,13 @@ known, it can be explicitly provided to attach via the command-line, e.g.
|
|||||||
nativeAssetsYamlFile: stringArg(FlutterOptions.kNativeAssetsYamlFile),
|
nativeAssetsYamlFile: stringArg(FlutterOptions.kNativeAssetsYamlFile),
|
||||||
nativeAssetsBuilder: _nativeAssetsBuilder,
|
nativeAssetsBuilder: _nativeAssetsBuilder,
|
||||||
analytics: analytics,
|
analytics: analytics,
|
||||||
|
useImplicitPubspecResolution: useImplicitPubspecResolution,
|
||||||
)
|
)
|
||||||
: ColdRunner(
|
: ColdRunner(
|
||||||
flutterDevices,
|
flutterDevices,
|
||||||
target: targetFile,
|
target: targetFile,
|
||||||
debuggingOptions: debuggingOptions,
|
debuggingOptions: debuggingOptions,
|
||||||
|
useImplicitPubspecResolution: useImplicitPubspecResolution,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -509,6 +513,7 @@ class HotRunnerFactory {
|
|||||||
FlutterProject? flutterProject,
|
FlutterProject? flutterProject,
|
||||||
String? nativeAssetsYamlFile,
|
String? nativeAssetsYamlFile,
|
||||||
required HotRunnerNativeAssetsBuilder? nativeAssetsBuilder,
|
required HotRunnerNativeAssetsBuilder? nativeAssetsBuilder,
|
||||||
|
required bool useImplicitPubspecResolution,
|
||||||
required Analytics analytics,
|
required Analytics analytics,
|
||||||
}) => HotRunner(
|
}) => HotRunner(
|
||||||
devices,
|
devices,
|
||||||
@ -523,5 +528,6 @@ class HotRunnerFactory {
|
|||||||
nativeAssetsYamlFile: nativeAssetsYamlFile,
|
nativeAssetsYamlFile: nativeAssetsYamlFile,
|
||||||
nativeAssetsBuilder: nativeAssetsBuilder,
|
nativeAssetsBuilder: nativeAssetsBuilder,
|
||||||
analytics: analytics,
|
analytics: analytics,
|
||||||
|
useImplicitPubspecResolution: useImplicitPubspecResolution,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -13,6 +13,7 @@ import '../globals.dart' as globals;
|
|||||||
import '../project.dart';
|
import '../project.dart';
|
||||||
import '../reporting/reporting.dart';
|
import '../reporting/reporting.dart';
|
||||||
import '../runner/flutter_command.dart';
|
import '../runner/flutter_command.dart';
|
||||||
|
import '../runner/flutter_command_runner.dart';
|
||||||
import 'build.dart';
|
import 'build.dart';
|
||||||
|
|
||||||
class BuildBundleCommand extends BuildSubCommand {
|
class BuildBundleCommand extends BuildSubCommand {
|
||||||
@ -149,6 +150,7 @@ class BuildBundleCommand extends BuildSubCommand {
|
|||||||
depfilePath: stringArg('depfile'),
|
depfilePath: stringArg('depfile'),
|
||||||
assetDirPath: stringArg('asset-dir'),
|
assetDirPath: stringArg('asset-dir'),
|
||||||
buildNativeAssets: false,
|
buildNativeAssets: false,
|
||||||
|
useImplicitPubspecResolution: globalResults!.flag(FlutterGlobalOptions.kImplicitPubspecResolution),
|
||||||
);
|
);
|
||||||
return FlutterCommandResult.success();
|
return FlutterCommandResult.success();
|
||||||
}
|
}
|
||||||
|
@ -21,6 +21,7 @@ import '../flutter_plugins.dart';
|
|||||||
import '../globals.dart' as globals;
|
import '../globals.dart' as globals;
|
||||||
import '../macos/cocoapod_utils.dart';
|
import '../macos/cocoapod_utils.dart';
|
||||||
import '../runner/flutter_command.dart' show DevelopmentArtifact, FlutterCommandResult;
|
import '../runner/flutter_command.dart' show DevelopmentArtifact, FlutterCommandResult;
|
||||||
|
import '../runner/flutter_command_runner.dart';
|
||||||
import '../version.dart';
|
import '../version.dart';
|
||||||
import 'build.dart';
|
import 'build.dart';
|
||||||
|
|
||||||
@ -460,6 +461,7 @@ end
|
|||||||
? null
|
? null
|
||||||
: globals.flutterVersion.engineRevision,
|
: globals.flutterVersion.engineRevision,
|
||||||
generateDartPluginRegistry: true,
|
generateDartPluginRegistry: true,
|
||||||
|
useImplicitPubspecResolution: globalResults!.flag(FlutterGlobalOptions.kImplicitPubspecResolution),
|
||||||
);
|
);
|
||||||
Target target;
|
Target target;
|
||||||
// Always build debug for simulator.
|
// Always build debug for simulator.
|
||||||
|
@ -19,6 +19,7 @@ import '../flutter_plugins.dart';
|
|||||||
import '../globals.dart' as globals;
|
import '../globals.dart' as globals;
|
||||||
import '../macos/cocoapod_utils.dart';
|
import '../macos/cocoapod_utils.dart';
|
||||||
import '../runner/flutter_command.dart' show DevelopmentArtifact, FlutterCommandResult;
|
import '../runner/flutter_command.dart' show DevelopmentArtifact, FlutterCommandResult;
|
||||||
|
import '../runner/flutter_command_runner.dart';
|
||||||
import '../version.dart';
|
import '../version.dart';
|
||||||
import 'build_ios_framework.dart';
|
import 'build_ios_framework.dart';
|
||||||
|
|
||||||
@ -239,6 +240,7 @@ end
|
|||||||
analytics: globals.analytics,
|
analytics: globals.analytics,
|
||||||
engineVersion: globals.artifacts!.usesLocalArtifacts ? null : globals.flutterVersion.engineRevision,
|
engineVersion: globals.artifacts!.usesLocalArtifacts ? null : globals.flutterVersion.engineRevision,
|
||||||
generateDartPluginRegistry: true,
|
generateDartPluginRegistry: true,
|
||||||
|
useImplicitPubspecResolution: globalResults!.flag(FlutterGlobalOptions.kImplicitPubspecResolution),
|
||||||
);
|
);
|
||||||
Target target;
|
Target target;
|
||||||
// Always build debug for simulator.
|
// Always build debug for simulator.
|
||||||
|
@ -10,6 +10,7 @@ import '../features.dart';
|
|||||||
import '../globals.dart' as globals;
|
import '../globals.dart' as globals;
|
||||||
import '../runner/flutter_command.dart'
|
import '../runner/flutter_command.dart'
|
||||||
show DevelopmentArtifact, FlutterCommandResult, FlutterOptions;
|
show DevelopmentArtifact, FlutterCommandResult, FlutterOptions;
|
||||||
|
import '../runner/flutter_command_runner.dart';
|
||||||
import '../web/compile.dart';
|
import '../web/compile.dart';
|
||||||
import '../web/file_generators/flutter_service_worker_js.dart';
|
import '../web/file_generators/flutter_service_worker_js.dart';
|
||||||
import '../web/web_constants.dart';
|
import '../web/web_constants.dart';
|
||||||
@ -226,6 +227,7 @@ class BuildWebCommand extends BuildSubCommand {
|
|||||||
flutterVersion: globals.flutterVersion,
|
flutterVersion: globals.flutterVersion,
|
||||||
usage: globals.flutterUsage,
|
usage: globals.flutterUsage,
|
||||||
analytics: globals.analytics,
|
analytics: globals.analytics,
|
||||||
|
useImplicitPubspecResolution: globalResults!.flag(FlutterGlobalOptions.kImplicitPubspecResolution),
|
||||||
);
|
);
|
||||||
await webBuilder.buildWeb(
|
await webBuilder.buildWeb(
|
||||||
project,
|
project,
|
||||||
|
@ -21,6 +21,7 @@ import '../flutter_project_metadata.dart';
|
|||||||
import '../globals.dart' as globals;
|
import '../globals.dart' as globals;
|
||||||
import '../project.dart';
|
import '../project.dart';
|
||||||
import '../runner/flutter_command.dart';
|
import '../runner/flutter_command.dart';
|
||||||
|
import '../runner/flutter_command_runner.dart';
|
||||||
import '../template.dart';
|
import '../template.dart';
|
||||||
|
|
||||||
const List<String> _kAvailablePlatforms = <String>[
|
const List<String> _kAvailablePlatforms = <String>[
|
||||||
@ -574,6 +575,7 @@ abstract class CreateBase extends FlutterCommand {
|
|||||||
projectDir: project.directory,
|
projectDir: project.directory,
|
||||||
packageConfigPath: packageConfigPath(),
|
packageConfigPath: packageConfigPath(),
|
||||||
generateDartPluginRegistry: true,
|
generateDartPluginRegistry: true,
|
||||||
|
useImplicitPubspecResolution: globalResults!.flag(FlutterGlobalOptions.kImplicitPubspecResolution),
|
||||||
);
|
);
|
||||||
|
|
||||||
// Generate the l10n synthetic package that will be injected into the
|
// Generate the l10n synthetic package that will be injected into the
|
||||||
|
@ -377,7 +377,8 @@ class CustomDevicesAddCommand extends CustomDevicesCommandBase {
|
|||||||
final CustomDevice device = CustomDevice(
|
final CustomDevice device = CustomDevice(
|
||||||
config: config,
|
config: config,
|
||||||
logger: logger,
|
logger: logger,
|
||||||
processManager: _processManager
|
processManager: _processManager,
|
||||||
|
useImplicitPubspecResolution: globalResults!.flag(FlutterGlobalOptions.kImplicitPubspecResolution),
|
||||||
);
|
);
|
||||||
|
|
||||||
bool result = true;
|
bool result = true;
|
||||||
|
@ -32,6 +32,7 @@ import '../resident_runner.dart';
|
|||||||
import '../run_cold.dart';
|
import '../run_cold.dart';
|
||||||
import '../run_hot.dart';
|
import '../run_hot.dart';
|
||||||
import '../runner/flutter_command.dart';
|
import '../runner/flutter_command.dart';
|
||||||
|
import '../runner/flutter_command_runner.dart';
|
||||||
import '../vmservice.dart';
|
import '../vmservice.dart';
|
||||||
import '../web/web_runner.dart';
|
import '../web/web_runner.dart';
|
||||||
|
|
||||||
@ -66,6 +67,7 @@ class DaemonCommand extends FlutterCommand {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Future<FlutterCommandResult> runCommand() async {
|
Future<FlutterCommandResult> runCommand() async {
|
||||||
|
final bool useImplicitPubspecResolution = globalResults!.flag(FlutterGlobalOptions.kImplicitPubspecResolution);
|
||||||
if (argResults!['listen-on-tcp-port'] != null) {
|
if (argResults!['listen-on-tcp-port'] != null) {
|
||||||
int? port;
|
int? port;
|
||||||
try {
|
try {
|
||||||
@ -82,6 +84,7 @@ class DaemonCommand extends FlutterCommand {
|
|||||||
outputPreferences: globals.outputPreferences,
|
outputPreferences: globals.outputPreferences,
|
||||||
),
|
),
|
||||||
notifyingLogger: asLogger<NotifyingLogger>(globals.logger),
|
notifyingLogger: asLogger<NotifyingLogger>(globals.logger),
|
||||||
|
useImplicitPubspecResolution: useImplicitPubspecResolution,
|
||||||
).run();
|
).run();
|
||||||
return FlutterCommandResult.success();
|
return FlutterCommandResult.success();
|
||||||
}
|
}
|
||||||
@ -92,6 +95,7 @@ class DaemonCommand extends FlutterCommand {
|
|||||||
logger: globals.logger,
|
logger: globals.logger,
|
||||||
),
|
),
|
||||||
notifyingLogger: asLogger<NotifyingLogger>(globals.logger),
|
notifyingLogger: asLogger<NotifyingLogger>(globals.logger),
|
||||||
|
useImplicitPubspecResolution: useImplicitPubspecResolution,
|
||||||
);
|
);
|
||||||
final int code = await daemon.onExit;
|
final int code = await daemon.onExit;
|
||||||
if (code != 0) {
|
if (code != 0) {
|
||||||
@ -105,10 +109,11 @@ class DaemonCommand extends FlutterCommand {
|
|||||||
class DaemonServer {
|
class DaemonServer {
|
||||||
DaemonServer({
|
DaemonServer({
|
||||||
this.port,
|
this.port,
|
||||||
|
required bool useImplicitPubspecResolution,
|
||||||
required this.logger,
|
required this.logger,
|
||||||
this.notifyingLogger,
|
this.notifyingLogger,
|
||||||
@visibleForTesting Future<ServerSocket> Function(InternetAddress address, int port) bind = ServerSocket.bind,
|
@visibleForTesting Future<ServerSocket> Function(InternetAddress address, int port) bind = ServerSocket.bind,
|
||||||
}) : _bind = bind;
|
}) : _bind = bind, _useImplicitPubspecResolution = useImplicitPubspecResolution;
|
||||||
|
|
||||||
final int? port;
|
final int? port;
|
||||||
|
|
||||||
@ -117,6 +122,7 @@ class DaemonServer {
|
|||||||
|
|
||||||
// Logger that sends the message to the other end of daemon connection.
|
// Logger that sends the message to the other end of daemon connection.
|
||||||
final NotifyingLogger? notifyingLogger;
|
final NotifyingLogger? notifyingLogger;
|
||||||
|
final bool _useImplicitPubspecResolution;
|
||||||
|
|
||||||
final Future<ServerSocket> Function(InternetAddress address, int port) _bind;
|
final Future<ServerSocket> Function(InternetAddress address, int port) _bind;
|
||||||
|
|
||||||
@ -151,6 +157,7 @@ class DaemonServer {
|
|||||||
logger: logger,
|
logger: logger,
|
||||||
),
|
),
|
||||||
notifyingLogger: notifyingLogger,
|
notifyingLogger: notifyingLogger,
|
||||||
|
useImplicitPubspecResolution: _useImplicitPubspecResolution,
|
||||||
);
|
);
|
||||||
await daemon.onExit;
|
await daemon.onExit;
|
||||||
await socketDone;
|
await socketDone;
|
||||||
@ -169,13 +176,14 @@ typedef CommandHandlerWithBinary = Future<Object?> Function(Map<String, Object?>
|
|||||||
class Daemon {
|
class Daemon {
|
||||||
Daemon(
|
Daemon(
|
||||||
this.connection, {
|
this.connection, {
|
||||||
|
required bool useImplicitPubspecResolution,
|
||||||
this.notifyingLogger,
|
this.notifyingLogger,
|
||||||
this.logToStdout = false,
|
this.logToStdout = false,
|
||||||
FileTransfer fileTransfer = const FileTransfer(),
|
FileTransfer fileTransfer = const FileTransfer(),
|
||||||
}) {
|
}) {
|
||||||
// Set up domains.
|
// Set up domains.
|
||||||
registerDomain(daemonDomain = DaemonDomain(this));
|
registerDomain(daemonDomain = DaemonDomain(this));
|
||||||
registerDomain(appDomain = AppDomain(this));
|
registerDomain(appDomain = AppDomain(this, useImplicitPubspecResolution: useImplicitPubspecResolution));
|
||||||
registerDomain(deviceDomain = DeviceDomain(this));
|
registerDomain(deviceDomain = DeviceDomain(this));
|
||||||
registerDomain(emulatorDomain = EmulatorDomain(this));
|
registerDomain(emulatorDomain = EmulatorDomain(this));
|
||||||
registerDomain(devToolsDomain = DevToolsDomain(this));
|
registerDomain(devToolsDomain = DevToolsDomain(this));
|
||||||
@ -637,7 +645,10 @@ typedef RunOrAttach = Future<void> Function({
|
|||||||
///
|
///
|
||||||
/// It fires events for application start, stop, and stdout and stderr.
|
/// It fires events for application start, stop, and stdout and stderr.
|
||||||
class AppDomain extends Domain {
|
class AppDomain extends Domain {
|
||||||
AppDomain(Daemon daemon) : super(daemon, 'app') {
|
AppDomain(Daemon daemon, {
|
||||||
|
required bool useImplicitPubspecResolution,
|
||||||
|
}) : _useImplicitPubspecResolution = useImplicitPubspecResolution,
|
||||||
|
super(daemon, 'app') {
|
||||||
registerHandler('restart', restart);
|
registerHandler('restart', restart);
|
||||||
registerHandler('callServiceExtension', callServiceExtension);
|
registerHandler('callServiceExtension', callServiceExtension);
|
||||||
registerHandler('stop', stop);
|
registerHandler('stop', stop);
|
||||||
@ -649,6 +660,7 @@ class AppDomain extends Domain {
|
|||||||
static String _getNewAppId() => _uuidGenerator.v4();
|
static String _getNewAppId() => _uuidGenerator.v4();
|
||||||
|
|
||||||
final List<AppInstance> _apps = <AppInstance>[];
|
final List<AppInstance> _apps = <AppInstance>[];
|
||||||
|
final bool _useImplicitPubspecResolution;
|
||||||
|
|
||||||
final DebounceOperationQueue<OperationResult, OperationType> operationQueue = DebounceOperationQueue<OperationResult, OperationType>();
|
final DebounceOperationQueue<OperationResult, OperationType> operationQueue = DebounceOperationQueue<OperationResult, OperationType>();
|
||||||
|
|
||||||
@ -705,6 +717,7 @@ class AppDomain extends Domain {
|
|||||||
systemClock: globals.systemClock,
|
systemClock: globals.systemClock,
|
||||||
logger: globals.logger,
|
logger: globals.logger,
|
||||||
fileSystem: globals.fs,
|
fileSystem: globals.fs,
|
||||||
|
useImplicitPubspecResolution: _useImplicitPubspecResolution,
|
||||||
);
|
);
|
||||||
} else if (enableHotReload) {
|
} else if (enableHotReload) {
|
||||||
runner = HotRunner(
|
runner = HotRunner(
|
||||||
@ -718,6 +731,7 @@ class AppDomain extends Domain {
|
|||||||
machine: machine,
|
machine: machine,
|
||||||
analytics: globals.analytics,
|
analytics: globals.analytics,
|
||||||
nativeAssetsBuilder: nativeAssetsBuilder,
|
nativeAssetsBuilder: nativeAssetsBuilder,
|
||||||
|
useImplicitPubspecResolution: _useImplicitPubspecResolution,
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
runner = ColdRunner(
|
runner = ColdRunner(
|
||||||
@ -726,6 +740,7 @@ class AppDomain extends Domain {
|
|||||||
debuggingOptions: options,
|
debuggingOptions: options,
|
||||||
applicationBinary: applicationBinary,
|
applicationBinary: applicationBinary,
|
||||||
machine: machine,
|
machine: machine,
|
||||||
|
useImplicitPubspecResolution: _useImplicitPubspecResolution,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -28,6 +28,7 @@ import '../ios/devices.dart';
|
|||||||
import '../macos/macos_ipad_device.dart';
|
import '../macos/macos_ipad_device.dart';
|
||||||
import '../resident_runner.dart';
|
import '../resident_runner.dart';
|
||||||
import '../runner/flutter_command.dart' show FlutterCommandCategory, FlutterCommandResult, FlutterOptions;
|
import '../runner/flutter_command.dart' show FlutterCommandCategory, FlutterCommandResult, FlutterOptions;
|
||||||
|
import '../runner/flutter_command_runner.dart';
|
||||||
import '../web/web_device.dart';
|
import '../web/web_device.dart';
|
||||||
import 'run.dart';
|
import 'run.dart';
|
||||||
|
|
||||||
@ -260,6 +261,7 @@ class DriveCommand extends RunCommandBase {
|
|||||||
processUtils: globals.processUtils,
|
processUtils: globals.processUtils,
|
||||||
dartSdkPath: globals.artifacts!.getArtifactPath(Artifact.engineDartBinary),
|
dartSdkPath: globals.artifacts!.getArtifactPath(Artifact.engineDartBinary),
|
||||||
devtoolsLauncher: DevtoolsLauncher.instance!,
|
devtoolsLauncher: DevtoolsLauncher.instance!,
|
||||||
|
useImplicitPubspecResolution: globalResults!.flag(FlutterGlobalOptions.kImplicitPubspecResolution),
|
||||||
);
|
);
|
||||||
final File packageConfigFile = findPackageConfigFileOrDefault(_fileSystem.currentDirectory);
|
final File packageConfigFile = findPackageConfigFileOrDefault(_fileSystem.currentDirectory);
|
||||||
|
|
||||||
|
@ -11,6 +11,7 @@ import '../base/logger.dart';
|
|||||||
import '../localizations/gen_l10n.dart';
|
import '../localizations/gen_l10n.dart';
|
||||||
import '../localizations/localizations_utils.dart';
|
import '../localizations/localizations_utils.dart';
|
||||||
import '../runner/flutter_command.dart';
|
import '../runner/flutter_command.dart';
|
||||||
|
import '../runner/flutter_command_runner.dart';
|
||||||
|
|
||||||
/// A command to generate localizations source files for a Flutter project.
|
/// A command to generate localizations source files for a Flutter project.
|
||||||
///
|
///
|
||||||
@ -246,6 +247,7 @@ class GenerateLocalizationsCommand extends FlutterCommand {
|
|||||||
file: _fileSystem.file('l10n.yaml'),
|
file: _fileSystem.file('l10n.yaml'),
|
||||||
logger: _logger,
|
logger: _logger,
|
||||||
defaultArbDir: defaultArbDir,
|
defaultArbDir: defaultArbDir,
|
||||||
|
defaultSyntheticPackage: globalResults!.flag(FlutterGlobalOptions.kImplicitPubspecResolution),
|
||||||
);
|
);
|
||||||
_logger.printStatus(
|
_logger.printStatus(
|
||||||
'Because l10n.yaml exists, the options defined there will be used '
|
'Because l10n.yaml exists, the options defined there will be used '
|
||||||
|
@ -305,6 +305,7 @@ class PackagesGetCommand extends FlutterCommand {
|
|||||||
projectDir: rootProject.directory,
|
projectDir: rootProject.directory,
|
||||||
packageConfigPath: packageConfigPath(),
|
packageConfigPath: packageConfigPath(),
|
||||||
generateDartPluginRegistry: true,
|
generateDartPluginRegistry: true,
|
||||||
|
useImplicitPubspecResolution: globalResults!.flag(FlutterGlobalOptions.kImplicitPubspecResolution),
|
||||||
);
|
);
|
||||||
|
|
||||||
await generateLocalizationsSyntheticPackage(
|
await generateLocalizationsSyntheticPackage(
|
||||||
@ -328,6 +329,7 @@ class PackagesGetCommand extends FlutterCommand {
|
|||||||
projectDir: rootProject.directory,
|
projectDir: rootProject.directory,
|
||||||
packageConfigPath: packageConfigPath(),
|
packageConfigPath: packageConfigPath(),
|
||||||
generateDartPluginRegistry: true,
|
generateDartPluginRegistry: true,
|
||||||
|
useImplicitPubspecResolution: globalResults!.flag(FlutterGlobalOptions.kImplicitPubspecResolution),
|
||||||
);
|
);
|
||||||
final BuildResult result = await globals.buildSystem.build(
|
final BuildResult result = await globals.buildSystem.build(
|
||||||
const GenerateLocalizationsTarget(),
|
const GenerateLocalizationsTarget(),
|
||||||
|
@ -682,6 +682,7 @@ class RunCommand extends RunCommandBase {
|
|||||||
required String? applicationBinaryPath,
|
required String? applicationBinaryPath,
|
||||||
required FlutterProject flutterProject,
|
required FlutterProject flutterProject,
|
||||||
}) async {
|
}) async {
|
||||||
|
final bool useImplicitPubspecResolution = globalResults!.flag(FlutterGlobalOptions.kImplicitPubspecResolution);
|
||||||
if (hotMode && !webMode) {
|
if (hotMode && !webMode) {
|
||||||
return HotRunner(
|
return HotRunner(
|
||||||
flutterDevices,
|
flutterDevices,
|
||||||
@ -697,6 +698,7 @@ class RunCommand extends RunCommandBase {
|
|||||||
analytics: globals.analytics,
|
analytics: globals.analytics,
|
||||||
nativeAssetsYamlFile: stringArg(FlutterOptions.kNativeAssetsYamlFile),
|
nativeAssetsYamlFile: stringArg(FlutterOptions.kNativeAssetsYamlFile),
|
||||||
nativeAssetsBuilder: _nativeAssetsBuilder,
|
nativeAssetsBuilder: _nativeAssetsBuilder,
|
||||||
|
useImplicitPubspecResolution: useImplicitPubspecResolution,
|
||||||
);
|
);
|
||||||
} else if (webMode) {
|
} else if (webMode) {
|
||||||
return webRunnerFactory!.createWebRunner(
|
return webRunnerFactory!.createWebRunner(
|
||||||
@ -710,6 +712,7 @@ class RunCommand extends RunCommandBase {
|
|||||||
analytics: globals.analytics,
|
analytics: globals.analytics,
|
||||||
logger: globals.logger,
|
logger: globals.logger,
|
||||||
systemClock: globals.systemClock,
|
systemClock: globals.systemClock,
|
||||||
|
useImplicitPubspecResolution: useImplicitPubspecResolution,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return ColdRunner(
|
return ColdRunner(
|
||||||
@ -722,11 +725,13 @@ class RunCommand extends RunCommandBase {
|
|||||||
? null
|
? null
|
||||||
: globals.fs.file(applicationBinaryPath),
|
: globals.fs.file(applicationBinaryPath),
|
||||||
stayResident: stayResident,
|
stayResident: stayResident,
|
||||||
|
useImplicitPubspecResolution: useImplicitPubspecResolution,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@visibleForTesting
|
@visibleForTesting
|
||||||
Daemon createMachineDaemon() {
|
Daemon createMachineDaemon() {
|
||||||
|
final bool useImplicitPubspecResolution = globalResults!.flag(FlutterGlobalOptions.kImplicitPubspecResolution);
|
||||||
final Daemon daemon = Daemon(
|
final Daemon daemon = Daemon(
|
||||||
DaemonConnection(
|
DaemonConnection(
|
||||||
daemonStreams: DaemonStreams.fromStdio(globals.stdio, logger: globals.logger),
|
daemonStreams: DaemonStreams.fromStdio(globals.stdio, logger: globals.logger),
|
||||||
@ -736,6 +741,7 @@ class RunCommand extends RunCommandBase {
|
|||||||
? globals.logger as NotifyingLogger
|
? globals.logger as NotifyingLogger
|
||||||
: NotifyingLogger(verbose: globals.logger.isVerbose, parent: globals.logger),
|
: NotifyingLogger(verbose: globals.logger.isVerbose, parent: globals.logger),
|
||||||
logToStdout: true,
|
logToStdout: true,
|
||||||
|
useImplicitPubspecResolution: useImplicitPubspecResolution,
|
||||||
);
|
);
|
||||||
return daemon;
|
return daemon;
|
||||||
}
|
}
|
||||||
|
@ -68,6 +68,7 @@ import 'windows/windows_workflow.dart';
|
|||||||
|
|
||||||
Future<T> runInContext<T>(
|
Future<T> runInContext<T>(
|
||||||
FutureOr<T> Function() runner, {
|
FutureOr<T> Function() runner, {
|
||||||
|
bool useImplicitPubspecResolution = true,
|
||||||
Map<Type, Generator>? overrides,
|
Map<Type, Generator>? overrides,
|
||||||
}) async {
|
}) async {
|
||||||
|
|
||||||
@ -210,6 +211,7 @@ Future<T> runInContext<T>(
|
|||||||
operatingSystemUtils: globals.os,
|
operatingSystemUtils: globals.os,
|
||||||
customDevicesConfig: globals.customDevicesConfig,
|
customDevicesConfig: globals.customDevicesConfig,
|
||||||
nativeAssetsBuilder: globals.nativeAssetsBuilder,
|
nativeAssetsBuilder: globals.nativeAssetsBuilder,
|
||||||
|
useImplicitPubspecResolution: useImplicitPubspecResolution,
|
||||||
),
|
),
|
||||||
DevtoolsLauncher: () => DevtoolsServerLauncher(
|
DevtoolsLauncher: () => DevtoolsServerLauncher(
|
||||||
processManager: globals.processManager,
|
processManager: globals.processManager,
|
||||||
|
@ -440,8 +440,10 @@ class CustomDevice extends Device {
|
|||||||
required CustomDeviceConfig config,
|
required CustomDeviceConfig config,
|
||||||
required super.logger,
|
required super.logger,
|
||||||
required ProcessManager processManager,
|
required ProcessManager processManager,
|
||||||
|
required bool useImplicitPubspecResolution,
|
||||||
}) : _config = config,
|
}) : _config = config,
|
||||||
_logger = logger,
|
_logger = logger,
|
||||||
|
_useImplicitPubspecResolution = useImplicitPubspecResolution,
|
||||||
_processManager = processManager,
|
_processManager = processManager,
|
||||||
_processUtils = ProcessUtils(
|
_processUtils = ProcessUtils(
|
||||||
processManager: processManager,
|
processManager: processManager,
|
||||||
@ -469,6 +471,7 @@ class CustomDevice extends Device {
|
|||||||
final ProcessUtils _processUtils;
|
final ProcessUtils _processUtils;
|
||||||
final Map<ApplicationPackage, CustomDeviceAppSession> _sessions = <ApplicationPackage, CustomDeviceAppSession>{};
|
final Map<ApplicationPackage, CustomDeviceAppSession> _sessions = <ApplicationPackage, CustomDeviceAppSession>{};
|
||||||
final CustomDeviceLogReader _globalLogReader;
|
final CustomDeviceLogReader _globalLogReader;
|
||||||
|
final bool _useImplicitPubspecResolution;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
final DevicePortForwarder portForwarder;
|
final DevicePortForwarder portForwarder;
|
||||||
@ -762,6 +765,7 @@ class CustomDevice extends Device {
|
|||||||
mainPath: mainPath,
|
mainPath: mainPath,
|
||||||
depfilePath: defaultDepfilePath,
|
depfilePath: defaultDepfilePath,
|
||||||
assetDirPath: assetBundleDir,
|
assetDirPath: assetBundleDir,
|
||||||
|
useImplicitPubspecResolution: _useImplicitPubspecResolution,
|
||||||
);
|
);
|
||||||
|
|
||||||
// if we have a post build step (needed for some embedders), execute it
|
// if we have a post build step (needed for some embedders), execute it
|
||||||
@ -822,15 +826,18 @@ class CustomDevices extends PollingDeviceDiscovery {
|
|||||||
required FeatureFlags featureFlags,
|
required FeatureFlags featureFlags,
|
||||||
required ProcessManager processManager,
|
required ProcessManager processManager,
|
||||||
required Logger logger,
|
required Logger logger,
|
||||||
required CustomDevicesConfig config
|
required CustomDevicesConfig config,
|
||||||
|
required bool useImplicitPubspecResolution,
|
||||||
}) : _customDeviceWorkflow = CustomDeviceWorkflow(
|
}) : _customDeviceWorkflow = CustomDeviceWorkflow(
|
||||||
featureFlags: featureFlags,
|
featureFlags: featureFlags,
|
||||||
),
|
),
|
||||||
|
_useImplicitPubspecResolution = useImplicitPubspecResolution,
|
||||||
_logger = logger,
|
_logger = logger,
|
||||||
_processManager = processManager,
|
_processManager = processManager,
|
||||||
_config = config,
|
_config = config,
|
||||||
super('custom devices');
|
super('custom devices');
|
||||||
|
|
||||||
|
final bool _useImplicitPubspecResolution;
|
||||||
final CustomDeviceWorkflow _customDeviceWorkflow;
|
final CustomDeviceWorkflow _customDeviceWorkflow;
|
||||||
final ProcessManager _processManager;
|
final ProcessManager _processManager;
|
||||||
final Logger _logger;
|
final Logger _logger;
|
||||||
@ -851,7 +858,8 @@ class CustomDevices extends PollingDeviceDiscovery {
|
|||||||
(CustomDeviceConfig config) => CustomDevice(
|
(CustomDeviceConfig config) => CustomDevice(
|
||||||
config: config,
|
config: config,
|
||||||
logger: _logger,
|
logger: _logger,
|
||||||
processManager: _processManager
|
processManager: _processManager,
|
||||||
|
useImplicitPubspecResolution: _useImplicitPubspecResolution,
|
||||||
)
|
)
|
||||||
).toList();
|
).toList();
|
||||||
}
|
}
|
||||||
|
@ -28,17 +28,20 @@ class FlutterDriverFactory {
|
|||||||
required ProcessUtils processUtils,
|
required ProcessUtils processUtils,
|
||||||
required String dartSdkPath,
|
required String dartSdkPath,
|
||||||
required DevtoolsLauncher devtoolsLauncher,
|
required DevtoolsLauncher devtoolsLauncher,
|
||||||
|
required bool useImplicitPubspecResolution,
|
||||||
}) : _applicationPackageFactory = applicationPackageFactory,
|
}) : _applicationPackageFactory = applicationPackageFactory,
|
||||||
_logger = logger,
|
_logger = logger,
|
||||||
_processUtils = processUtils,
|
_processUtils = processUtils,
|
||||||
_dartSdkPath = dartSdkPath,
|
_dartSdkPath = dartSdkPath,
|
||||||
_devtoolsLauncher = devtoolsLauncher;
|
_devtoolsLauncher = devtoolsLauncher,
|
||||||
|
_useImplicitPubspecResolution = useImplicitPubspecResolution;
|
||||||
|
|
||||||
final ApplicationPackageFactory _applicationPackageFactory;
|
final ApplicationPackageFactory _applicationPackageFactory;
|
||||||
final Logger _logger;
|
final Logger _logger;
|
||||||
final ProcessUtils _processUtils;
|
final ProcessUtils _processUtils;
|
||||||
final String _dartSdkPath;
|
final String _dartSdkPath;
|
||||||
final DevtoolsLauncher _devtoolsLauncher;
|
final DevtoolsLauncher _devtoolsLauncher;
|
||||||
|
final bool _useImplicitPubspecResolution;
|
||||||
|
|
||||||
/// Create a driver service for running `flutter drive`.
|
/// Create a driver service for running `flutter drive`.
|
||||||
DriverService createDriverService(bool web) {
|
DriverService createDriverService(bool web) {
|
||||||
@ -47,6 +50,7 @@ class FlutterDriverFactory {
|
|||||||
logger: _logger,
|
logger: _logger,
|
||||||
processUtils: _processUtils,
|
processUtils: _processUtils,
|
||||||
dartSdkPath: _dartSdkPath,
|
dartSdkPath: _dartSdkPath,
|
||||||
|
useImplicitPubspecResolution: _useImplicitPubspecResolution,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return FlutterDriverService(
|
return FlutterDriverService(
|
||||||
|
@ -30,13 +30,16 @@ class WebDriverService extends DriverService {
|
|||||||
required ProcessUtils processUtils,
|
required ProcessUtils processUtils,
|
||||||
required String dartSdkPath,
|
required String dartSdkPath,
|
||||||
required Logger logger,
|
required Logger logger,
|
||||||
|
required bool useImplicitPubspecResolution,
|
||||||
}) : _processUtils = processUtils,
|
}) : _processUtils = processUtils,
|
||||||
_dartSdkPath = dartSdkPath,
|
_dartSdkPath = dartSdkPath,
|
||||||
_logger = logger;
|
_logger = logger,
|
||||||
|
_useImplicitPubspecResolution = useImplicitPubspecResolution;
|
||||||
|
|
||||||
final ProcessUtils _processUtils;
|
final ProcessUtils _processUtils;
|
||||||
final String _dartSdkPath;
|
final String _dartSdkPath;
|
||||||
final Logger _logger;
|
final Logger _logger;
|
||||||
|
final bool _useImplicitPubspecResolution;
|
||||||
|
|
||||||
late ResidentRunner _residentRunner;
|
late ResidentRunner _residentRunner;
|
||||||
Uri? _webUri;
|
Uri? _webUri;
|
||||||
@ -94,6 +97,7 @@ class WebDriverService extends DriverService {
|
|||||||
analytics: globals.analytics,
|
analytics: globals.analytics,
|
||||||
logger: _logger,
|
logger: _logger,
|
||||||
systemClock: globals.systemClock,
|
systemClock: globals.systemClock,
|
||||||
|
useImplicitPubspecResolution: _useImplicitPubspecResolution,
|
||||||
);
|
);
|
||||||
final Completer<void> appStartedCompleter = Completer<void>.sync();
|
final Completer<void> appStartedCompleter = Completer<void>.sync();
|
||||||
final Future<int?> runFuture = _residentRunner.run(
|
final Future<int?> runFuture = _residentRunner.run(
|
||||||
|
@ -53,6 +53,7 @@ class FlutterDeviceManager extends DeviceManager {
|
|||||||
required WindowsWorkflow windowsWorkflow,
|
required WindowsWorkflow windowsWorkflow,
|
||||||
required CustomDevicesConfig customDevicesConfig,
|
required CustomDevicesConfig customDevicesConfig,
|
||||||
required TestCompilerNativeAssetsBuilder? nativeAssetsBuilder,
|
required TestCompilerNativeAssetsBuilder? nativeAssetsBuilder,
|
||||||
|
required bool useImplicitPubspecResolution,
|
||||||
}) : deviceDiscoverers = <DeviceDiscovery>[
|
}) : deviceDiscoverers = <DeviceDiscovery>[
|
||||||
AndroidDevices(
|
AndroidDevices(
|
||||||
logger: logger,
|
logger: logger,
|
||||||
@ -79,6 +80,7 @@ class FlutterDeviceManager extends DeviceManager {
|
|||||||
logger: logger,
|
logger: logger,
|
||||||
artifacts: artifacts,
|
artifacts: artifacts,
|
||||||
nativeAssetsBuilder: nativeAssetsBuilder,
|
nativeAssetsBuilder: nativeAssetsBuilder,
|
||||||
|
useImplicitPubspecResolution: useImplicitPubspecResolution,
|
||||||
),
|
),
|
||||||
MacOSDevices(
|
MacOSDevices(
|
||||||
processManager: processManager,
|
processManager: processManager,
|
||||||
@ -103,6 +105,7 @@ class FlutterDeviceManager extends DeviceManager {
|
|||||||
logger: logger,
|
logger: logger,
|
||||||
processManager: processManager,
|
processManager: processManager,
|
||||||
featureFlags: featureFlags,
|
featureFlags: featureFlags,
|
||||||
|
useImplicitPubspecResolution: useImplicitPubspecResolution,
|
||||||
),
|
),
|
||||||
LinuxDevices(
|
LinuxDevices(
|
||||||
platform: platform,
|
platform: platform,
|
||||||
@ -130,7 +133,8 @@ class FlutterDeviceManager extends DeviceManager {
|
|||||||
featureFlags: featureFlags,
|
featureFlags: featureFlags,
|
||||||
processManager: processManager,
|
processManager: processManager,
|
||||||
logger: logger,
|
logger: logger,
|
||||||
config: customDevicesConfig
|
config: customDevicesConfig,
|
||||||
|
useImplicitPubspecResolution: useImplicitPubspecResolution,
|
||||||
),
|
),
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -57,6 +57,7 @@ class DwdsWebRunnerFactory extends WebRunnerFactory {
|
|||||||
required SystemClock systemClock,
|
required SystemClock systemClock,
|
||||||
required Usage usage,
|
required Usage usage,
|
||||||
required Analytics analytics,
|
required Analytics analytics,
|
||||||
|
required bool useImplicitPubspecResolution,
|
||||||
bool machine = false,
|
bool machine = false,
|
||||||
}) {
|
}) {
|
||||||
return ResidentWebRunner(
|
return ResidentWebRunner(
|
||||||
@ -72,6 +73,7 @@ class DwdsWebRunnerFactory extends WebRunnerFactory {
|
|||||||
systemClock: systemClock,
|
systemClock: systemClock,
|
||||||
fileSystem: fileSystem,
|
fileSystem: fileSystem,
|
||||||
logger: logger,
|
logger: logger,
|
||||||
|
useImplicitPubspecResolution: useImplicitPubspecResolution,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -87,6 +89,7 @@ class ResidentWebRunner extends ResidentRunner {
|
|||||||
bool stayResident = true,
|
bool stayResident = true,
|
||||||
bool machine = false,
|
bool machine = false,
|
||||||
required this.flutterProject,
|
required this.flutterProject,
|
||||||
|
required bool useImplicitPubspecResolution,
|
||||||
required DebuggingOptions debuggingOptions,
|
required DebuggingOptions debuggingOptions,
|
||||||
required FileSystem fileSystem,
|
required FileSystem fileSystem,
|
||||||
required Logger logger,
|
required Logger logger,
|
||||||
@ -102,6 +105,7 @@ class ResidentWebRunner extends ResidentRunner {
|
|||||||
_usage = usage,
|
_usage = usage,
|
||||||
_analytics = analytics,
|
_analytics = analytics,
|
||||||
_urlTunneller = urlTunneller,
|
_urlTunneller = urlTunneller,
|
||||||
|
_useImplicitPubspecResolution = useImplicitPubspecResolution,
|
||||||
super(
|
super(
|
||||||
<FlutterDevice>[device],
|
<FlutterDevice>[device],
|
||||||
target: target ?? fileSystem.path.join('lib', 'main.dart'),
|
target: target ?? fileSystem.path.join('lib', 'main.dart'),
|
||||||
@ -109,6 +113,7 @@ class ResidentWebRunner extends ResidentRunner {
|
|||||||
stayResident: stayResident,
|
stayResident: stayResident,
|
||||||
machine: machine,
|
machine: machine,
|
||||||
devtoolsHandler: devtoolsHandler,
|
devtoolsHandler: devtoolsHandler,
|
||||||
|
useImplicitPubspecResolution: useImplicitPubspecResolution,
|
||||||
);
|
);
|
||||||
|
|
||||||
final FileSystem _fileSystem;
|
final FileSystem _fileSystem;
|
||||||
@ -117,6 +122,7 @@ class ResidentWebRunner extends ResidentRunner {
|
|||||||
final Usage _usage;
|
final Usage _usage;
|
||||||
final Analytics _analytics;
|
final Analytics _analytics;
|
||||||
final UrlTunneller? _urlTunneller;
|
final UrlTunneller? _urlTunneller;
|
||||||
|
final bool _useImplicitPubspecResolution;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Logger get logger => _logger;
|
Logger get logger => _logger;
|
||||||
@ -345,6 +351,7 @@ Please provide a valid TCP port (an integer between 0 and 65535, inclusive).
|
|||||||
flutterVersion: globals.flutterVersion,
|
flutterVersion: globals.flutterVersion,
|
||||||
usage: globals.flutterUsage,
|
usage: globals.flutterUsage,
|
||||||
analytics: globals.analytics,
|
analytics: globals.analytics,
|
||||||
|
useImplicitPubspecResolution: _useImplicitPubspecResolution,
|
||||||
);
|
);
|
||||||
await webBuilder.buildWeb(
|
await webBuilder.buildWeb(
|
||||||
flutterProject,
|
flutterProject,
|
||||||
@ -441,6 +448,7 @@ Please provide a valid TCP port (an integer between 0 and 65535, inclusive).
|
|||||||
flutterVersion: globals.flutterVersion,
|
flutterVersion: globals.flutterVersion,
|
||||||
usage: globals.flutterUsage,
|
usage: globals.flutterUsage,
|
||||||
analytics: globals.analytics,
|
analytics: globals.analytics,
|
||||||
|
useImplicitPubspecResolution: _useImplicitPubspecResolution,
|
||||||
);
|
);
|
||||||
await webBuilder.buildWeb(
|
await webBuilder.buildWeb(
|
||||||
flutterProject,
|
flutterProject,
|
||||||
|
@ -9,6 +9,7 @@ import '../base/common.dart';
|
|||||||
import '../base/file_system.dart';
|
import '../base/file_system.dart';
|
||||||
import '../base/logger.dart';
|
import '../base/logger.dart';
|
||||||
import '../runner/flutter_command.dart';
|
import '../runner/flutter_command.dart';
|
||||||
|
import '../runner/flutter_command_runner.dart';
|
||||||
import 'gen_l10n_types.dart';
|
import 'gen_l10n_types.dart';
|
||||||
import 'language_subtag_registry.dart';
|
import 'language_subtag_registry.dart';
|
||||||
|
|
||||||
@ -471,6 +472,7 @@ LocalizationOptions parseLocalizationsOptionsFromYAML({
|
|||||||
required File file,
|
required File file,
|
||||||
required Logger logger,
|
required Logger logger,
|
||||||
required String defaultArbDir,
|
required String defaultArbDir,
|
||||||
|
required bool defaultSyntheticPackage,
|
||||||
}) {
|
}) {
|
||||||
final String contents = file.readAsStringSync();
|
final String contents = file.readAsStringSync();
|
||||||
if (contents.trim().isEmpty) {
|
if (contents.trim().isEmpty) {
|
||||||
@ -497,7 +499,7 @@ LocalizationOptions parseLocalizationsOptionsFromYAML({
|
|||||||
headerFile: _tryReadUri(yamlNode, 'header-file', logger)?.path,
|
headerFile: _tryReadUri(yamlNode, 'header-file', logger)?.path,
|
||||||
useDeferredLoading: _tryReadBool(yamlNode, 'use-deferred-loading', logger),
|
useDeferredLoading: _tryReadBool(yamlNode, 'use-deferred-loading', logger),
|
||||||
preferredSupportedLocales: _tryReadStringList(yamlNode, 'preferred-supported-locales', logger),
|
preferredSupportedLocales: _tryReadStringList(yamlNode, 'preferred-supported-locales', logger),
|
||||||
syntheticPackage: _tryReadBool(yamlNode, 'synthetic-package', logger),
|
syntheticPackage: _tryReadBool(yamlNode, 'synthetic-package', logger) ?? defaultSyntheticPackage,
|
||||||
requiredResourceAttributes: _tryReadBool(yamlNode, 'required-resource-attributes', logger),
|
requiredResourceAttributes: _tryReadBool(yamlNode, 'required-resource-attributes', logger),
|
||||||
nullableGetter: _tryReadBool(yamlNode, 'nullable-getter', logger),
|
nullableGetter: _tryReadBool(yamlNode, 'nullable-getter', logger),
|
||||||
format: _tryReadBool(yamlNode, 'format', logger),
|
format: _tryReadBool(yamlNode, 'format', logger),
|
||||||
@ -513,6 +515,15 @@ LocalizationOptions parseLocalizationsOptionsFromCommand({
|
|||||||
required FlutterCommand command,
|
required FlutterCommand command,
|
||||||
required String defaultArbDir,
|
required String defaultArbDir,
|
||||||
}) {
|
}) {
|
||||||
|
// TODO(matanlurey): Remove as part of https://github.com/flutter/flutter/issues/102983.
|
||||||
|
final bool syntheticPackage;
|
||||||
|
if (command.argResults!.wasParsed('synthetic-package')) {
|
||||||
|
// If provided explicitly, use the explicit value.
|
||||||
|
syntheticPackage = command.boolArg('synthetic-package');
|
||||||
|
} else {
|
||||||
|
// Otherwise, inherit from whatever the default of --implicit-pubspec-resolution is.
|
||||||
|
syntheticPackage = command.globalResults!.flag(FlutterGlobalOptions.kImplicitPubspecResolution);
|
||||||
|
}
|
||||||
return LocalizationOptions(
|
return LocalizationOptions(
|
||||||
arbDir: command.stringArg('arb-dir') ?? defaultArbDir,
|
arbDir: command.stringArg('arb-dir') ?? defaultArbDir,
|
||||||
outputDir: command.stringArg('output-dir'),
|
outputDir: command.stringArg('output-dir'),
|
||||||
@ -524,7 +535,7 @@ LocalizationOptions parseLocalizationsOptionsFromCommand({
|
|||||||
headerFile: command.stringArg('header-file'),
|
headerFile: command.stringArg('header-file'),
|
||||||
useDeferredLoading: command.boolArg('use-deferred-loading'),
|
useDeferredLoading: command.boolArg('use-deferred-loading'),
|
||||||
genInputsAndOutputsList: command.stringArg('gen-inputs-and-outputs-list'),
|
genInputsAndOutputsList: command.stringArg('gen-inputs-and-outputs-list'),
|
||||||
syntheticPackage: command.boolArg('synthetic-package'),
|
syntheticPackage: syntheticPackage,
|
||||||
projectDir: command.stringArg('project-dir'),
|
projectDir: command.stringArg('project-dir'),
|
||||||
requiredResourceAttributes: command.boolArg('required-resource-attributes'),
|
requiredResourceAttributes: command.boolArg('required-resource-attributes'),
|
||||||
nullableGetter: command.boolArg('nullable-getter'),
|
nullableGetter: command.boolArg('nullable-getter'),
|
||||||
|
@ -37,12 +37,14 @@ class PreviewDeviceDiscovery extends PollingDeviceDiscovery {
|
|||||||
required Logger logger,
|
required Logger logger,
|
||||||
required ProcessManager processManager,
|
required ProcessManager processManager,
|
||||||
required FeatureFlags featureFlags,
|
required FeatureFlags featureFlags,
|
||||||
|
required bool useImplicitPubspecResolution,
|
||||||
}) : _artifacts = artifacts,
|
}) : _artifacts = artifacts,
|
||||||
_logger = logger,
|
_logger = logger,
|
||||||
_processManager = processManager,
|
_processManager = processManager,
|
||||||
_fileSystem = fileSystem,
|
_fileSystem = fileSystem,
|
||||||
_platform = platform,
|
_platform = platform,
|
||||||
_features = featureFlags,
|
_features = featureFlags,
|
||||||
|
_useImplicitPubspecResolution = useImplicitPubspecResolution,
|
||||||
super('Flutter preview device');
|
super('Flutter preview device');
|
||||||
|
|
||||||
final Platform _platform;
|
final Platform _platform;
|
||||||
@ -51,6 +53,7 @@ class PreviewDeviceDiscovery extends PollingDeviceDiscovery {
|
|||||||
final ProcessManager _processManager;
|
final ProcessManager _processManager;
|
||||||
final FileSystem _fileSystem;
|
final FileSystem _fileSystem;
|
||||||
final FeatureFlags _features;
|
final FeatureFlags _features;
|
||||||
|
final bool _useImplicitPubspecResolution;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
bool get canListAnything => _platform.isWindows;
|
bool get canListAnything => _platform.isWindows;
|
||||||
@ -75,6 +78,7 @@ class PreviewDeviceDiscovery extends PollingDeviceDiscovery {
|
|||||||
logger: _logger,
|
logger: _logger,
|
||||||
processManager: _processManager,
|
processManager: _processManager,
|
||||||
previewBinary: previewBinary,
|
previewBinary: previewBinary,
|
||||||
|
useImplicitPubspecResolution: _useImplicitPubspecResolution,
|
||||||
);
|
);
|
||||||
return <Device>[
|
return <Device>[
|
||||||
if (_features.isPreviewDeviceEnabled)
|
if (_features.isPreviewDeviceEnabled)
|
||||||
@ -99,6 +103,7 @@ class PreviewDevice extends Device {
|
|||||||
required FileSystem fileSystem,
|
required FileSystem fileSystem,
|
||||||
required Artifacts artifacts,
|
required Artifacts artifacts,
|
||||||
required File previewBinary,
|
required File previewBinary,
|
||||||
|
required bool useImplicitPubspecResolution,
|
||||||
@visibleForTesting BundleBuilderFactory builderFactory = _defaultBundleBuilder,
|
@visibleForTesting BundleBuilderFactory builderFactory = _defaultBundleBuilder,
|
||||||
}) : _previewBinary = previewBinary,
|
}) : _previewBinary = previewBinary,
|
||||||
_processManager = processManager,
|
_processManager = processManager,
|
||||||
@ -106,6 +111,7 @@ class PreviewDevice extends Device {
|
|||||||
_fileSystem = fileSystem,
|
_fileSystem = fileSystem,
|
||||||
_bundleBuilderFactory = builderFactory,
|
_bundleBuilderFactory = builderFactory,
|
||||||
_artifacts = artifacts,
|
_artifacts = artifacts,
|
||||||
|
_useImplicitPubspecResolution = useImplicitPubspecResolution,
|
||||||
super('preview', ephemeral: false, category: Category.desktop, platformType: PlatformType.windowsPreview);
|
super('preview', ephemeral: false, category: Category.desktop, platformType: PlatformType.windowsPreview);
|
||||||
|
|
||||||
final ProcessManager _processManager;
|
final ProcessManager _processManager;
|
||||||
@ -114,6 +120,7 @@ class PreviewDevice extends Device {
|
|||||||
final BundleBuilderFactory _bundleBuilderFactory;
|
final BundleBuilderFactory _bundleBuilderFactory;
|
||||||
final Artifacts _artifacts;
|
final Artifacts _artifacts;
|
||||||
final File _previewBinary;
|
final File _previewBinary;
|
||||||
|
final bool _useImplicitPubspecResolution;
|
||||||
|
|
||||||
/// The set of plugins that are allowed to be used by Preview users.
|
/// The set of plugins that are allowed to be used by Preview users.
|
||||||
///
|
///
|
||||||
@ -184,6 +191,7 @@ class PreviewDevice extends Device {
|
|||||||
mainPath: mainPath,
|
mainPath: mainPath,
|
||||||
platform: TargetPlatform.windows_x64,
|
platform: TargetPlatform.windows_x64,
|
||||||
assetDirPath: getAssetBuildDirectory(),
|
assetDirPath: getAssetBuildDirectory(),
|
||||||
|
useImplicitPubspecResolution: _useImplicitPubspecResolution,
|
||||||
);
|
);
|
||||||
copyDirectory(_fileSystem.directory(
|
copyDirectory(_fileSystem.directory(
|
||||||
getAssetBuildDirectory()),
|
getAssetBuildDirectory()),
|
||||||
|
@ -1053,6 +1053,7 @@ abstract class ResidentRunner extends ResidentHandlers {
|
|||||||
this.flutterDevices, {
|
this.flutterDevices, {
|
||||||
required this.target,
|
required this.target,
|
||||||
required this.debuggingOptions,
|
required this.debuggingOptions,
|
||||||
|
required bool useImplicitPubspecResolution,
|
||||||
String? projectRootPath,
|
String? projectRootPath,
|
||||||
this.stayResident = true,
|
this.stayResident = true,
|
||||||
this.hotMode = true,
|
this.hotMode = true,
|
||||||
@ -1063,6 +1064,7 @@ abstract class ResidentRunner extends ResidentHandlers {
|
|||||||
packagesFilePath = debuggingOptions.buildInfo.packageConfigPath,
|
packagesFilePath = debuggingOptions.buildInfo.packageConfigPath,
|
||||||
projectRootPath = projectRootPath ?? globals.fs.currentDirectory.path,
|
projectRootPath = projectRootPath ?? globals.fs.currentDirectory.path,
|
||||||
_dillOutputPath = dillOutputPath,
|
_dillOutputPath = dillOutputPath,
|
||||||
|
_useImplicitPubspecResolution = useImplicitPubspecResolution,
|
||||||
artifactDirectory = dillOutputPath == null
|
artifactDirectory = dillOutputPath == null
|
||||||
? globals.fs.systemTempDirectory.createTempSync('flutter_tool.')
|
? globals.fs.systemTempDirectory.createTempSync('flutter_tool.')
|
||||||
: globals.fs.file(dillOutputPath).parent,
|
: globals.fs.file(dillOutputPath).parent,
|
||||||
@ -1095,6 +1097,7 @@ abstract class ResidentRunner extends ResidentHandlers {
|
|||||||
@override
|
@override
|
||||||
final bool stayResident;
|
final bool stayResident;
|
||||||
final String? _dillOutputPath;
|
final String? _dillOutputPath;
|
||||||
|
final bool _useImplicitPubspecResolution;
|
||||||
/// The parent location of the incremental artifacts.
|
/// The parent location of the incremental artifacts.
|
||||||
final Directory artifactDirectory;
|
final Directory artifactDirectory;
|
||||||
final String packagesFilePath;
|
final String packagesFilePath;
|
||||||
@ -1221,6 +1224,7 @@ abstract class ResidentRunner extends ResidentHandlers {
|
|||||||
// Needed for Dart plugin registry generation.
|
// Needed for Dart plugin registry generation.
|
||||||
kTargetFile: mainPath,
|
kTargetFile: mainPath,
|
||||||
},
|
},
|
||||||
|
useImplicitPubspecResolution: _useImplicitPubspecResolution,
|
||||||
);
|
);
|
||||||
|
|
||||||
final CompositeTarget compositeTarget = CompositeTarget(<Target>[
|
final CompositeTarget compositeTarget = CompositeTarget(<Target>[
|
||||||
|
@ -18,6 +18,7 @@ class ColdRunner extends ResidentRunner {
|
|||||||
super.flutterDevices, {
|
super.flutterDevices, {
|
||||||
required super.target,
|
required super.target,
|
||||||
required super.debuggingOptions,
|
required super.debuggingOptions,
|
||||||
|
required super.useImplicitPubspecResolution,
|
||||||
this.traceStartup = false,
|
this.traceStartup = false,
|
||||||
this.awaitFirstFrameWhenTracing = true,
|
this.awaitFirstFrameWhenTracing = true,
|
||||||
this.applicationBinary,
|
this.applicationBinary,
|
||||||
|
@ -79,6 +79,7 @@ class HotRunner extends ResidentRunner {
|
|||||||
super.flutterDevices, {
|
super.flutterDevices, {
|
||||||
required super.target,
|
required super.target,
|
||||||
required super.debuggingOptions,
|
required super.debuggingOptions,
|
||||||
|
required super.useImplicitPubspecResolution,
|
||||||
this.benchmarkMode = false,
|
this.benchmarkMode = false,
|
||||||
this.applicationBinary,
|
this.applicationBinary,
|
||||||
this.hostIsIde = false,
|
this.hostIsIde = false,
|
||||||
|
@ -1770,6 +1770,7 @@ Run 'flutter -h' (or 'flutter <command> -h') for available flutter commands and
|
|||||||
projectDir: project.directory,
|
projectDir: project.directory,
|
||||||
packageConfigPath: packageConfigPath(),
|
packageConfigPath: packageConfigPath(),
|
||||||
generateDartPluginRegistry: true,
|
generateDartPluginRegistry: true,
|
||||||
|
useImplicitPubspecResolution: globalResults!.flag(FlutterGlobalOptions.kImplicitPubspecResolution),
|
||||||
);
|
);
|
||||||
|
|
||||||
await pub.get(
|
await pub.get(
|
||||||
|
@ -51,6 +51,7 @@ class FlutterTesterDevice extends Device {
|
|||||||
required super.logger,
|
required super.logger,
|
||||||
required FileSystem fileSystem,
|
required FileSystem fileSystem,
|
||||||
required Artifacts artifacts,
|
required Artifacts artifacts,
|
||||||
|
required bool useImplicitPubspecResolution,
|
||||||
TestCompilerNativeAssetsBuilder? nativeAssetsBuilder,
|
TestCompilerNativeAssetsBuilder? nativeAssetsBuilder,
|
||||||
}) : _processManager = processManager,
|
}) : _processManager = processManager,
|
||||||
_flutterVersion = flutterVersion,
|
_flutterVersion = flutterVersion,
|
||||||
@ -58,6 +59,7 @@ class FlutterTesterDevice extends Device {
|
|||||||
_fileSystem = fileSystem,
|
_fileSystem = fileSystem,
|
||||||
_artifacts = artifacts,
|
_artifacts = artifacts,
|
||||||
_nativeAssetsBuilder = nativeAssetsBuilder,
|
_nativeAssetsBuilder = nativeAssetsBuilder,
|
||||||
|
_useImplicitPubspecResolution = useImplicitPubspecResolution,
|
||||||
super(
|
super(
|
||||||
platformType: null,
|
platformType: null,
|
||||||
category: null,
|
category: null,
|
||||||
@ -70,6 +72,7 @@ class FlutterTesterDevice extends Device {
|
|||||||
final FileSystem _fileSystem;
|
final FileSystem _fileSystem;
|
||||||
final Artifacts _artifacts;
|
final Artifacts _artifacts;
|
||||||
final TestCompilerNativeAssetsBuilder? _nativeAssetsBuilder;
|
final TestCompilerNativeAssetsBuilder? _nativeAssetsBuilder;
|
||||||
|
final bool _useImplicitPubspecResolution;
|
||||||
|
|
||||||
Process? _process;
|
Process? _process;
|
||||||
final DevicePortForwarder _portForwarder = const NoOpDevicePortForwarder();
|
final DevicePortForwarder _portForwarder = const NoOpDevicePortForwarder();
|
||||||
@ -164,6 +167,7 @@ class FlutterTesterDevice extends Device {
|
|||||||
applicationKernelFilePath: applicationKernelFilePath,
|
applicationKernelFilePath: applicationKernelFilePath,
|
||||||
platform: TargetPlatform.tester,
|
platform: TargetPlatform.tester,
|
||||||
assetDirPath: assetDirectory.path,
|
assetDirPath: assetDirectory.path,
|
||||||
|
useImplicitPubspecResolution: _useImplicitPubspecResolution,
|
||||||
);
|
);
|
||||||
|
|
||||||
final List<String> command = <String>[
|
final List<String> command = <String>[
|
||||||
@ -265,9 +269,8 @@ class FlutterTesterDevices extends PollingDeviceDiscovery {
|
|||||||
required ProcessManager processManager,
|
required ProcessManager processManager,
|
||||||
required Logger logger,
|
required Logger logger,
|
||||||
required FlutterVersion flutterVersion,
|
required FlutterVersion flutterVersion,
|
||||||
|
required bool useImplicitPubspecResolution,
|
||||||
TestCompilerNativeAssetsBuilder? nativeAssetsBuilder,
|
TestCompilerNativeAssetsBuilder? nativeAssetsBuilder,
|
||||||
// ignore: avoid_unused_constructor_parameters, temporarily unused to prepare G3.
|
|
||||||
bool useImplicitPubspecResolution = true,
|
|
||||||
}) : _testerDevice = FlutterTesterDevice(
|
}) : _testerDevice = FlutterTesterDevice(
|
||||||
kTesterDeviceId,
|
kTesterDeviceId,
|
||||||
fileSystem: fileSystem,
|
fileSystem: fileSystem,
|
||||||
@ -276,6 +279,7 @@ class FlutterTesterDevices extends PollingDeviceDiscovery {
|
|||||||
logger: logger,
|
logger: logger,
|
||||||
flutterVersion: flutterVersion,
|
flutterVersion: flutterVersion,
|
||||||
nativeAssetsBuilder: nativeAssetsBuilder,
|
nativeAssetsBuilder: nativeAssetsBuilder,
|
||||||
|
useImplicitPubspecResolution: useImplicitPubspecResolution,
|
||||||
),
|
),
|
||||||
super('Flutter tester');
|
super('Flutter tester');
|
||||||
|
|
||||||
|
@ -46,13 +46,15 @@ class WebBuilder {
|
|||||||
required Analytics analytics,
|
required Analytics analytics,
|
||||||
required FlutterVersion flutterVersion,
|
required FlutterVersion flutterVersion,
|
||||||
required FileSystem fileSystem,
|
required FileSystem fileSystem,
|
||||||
|
required bool useImplicitPubspecResolution,
|
||||||
}) : _logger = logger,
|
}) : _logger = logger,
|
||||||
_processManager = processManager,
|
_processManager = processManager,
|
||||||
_buildSystem = buildSystem,
|
_buildSystem = buildSystem,
|
||||||
_flutterUsage = usage,
|
_flutterUsage = usage,
|
||||||
_analytics = analytics,
|
_analytics = analytics,
|
||||||
_flutterVersion = flutterVersion,
|
_flutterVersion = flutterVersion,
|
||||||
_fileSystem = fileSystem;
|
_fileSystem = fileSystem,
|
||||||
|
_useImplicitPubspecResolution = useImplicitPubspecResolution;
|
||||||
|
|
||||||
final Logger _logger;
|
final Logger _logger;
|
||||||
final ProcessManager _processManager;
|
final ProcessManager _processManager;
|
||||||
@ -61,6 +63,7 @@ class WebBuilder {
|
|||||||
final Analytics _analytics;
|
final Analytics _analytics;
|
||||||
final FlutterVersion _flutterVersion;
|
final FlutterVersion _flutterVersion;
|
||||||
final FileSystem _fileSystem;
|
final FileSystem _fileSystem;
|
||||||
|
final bool _useImplicitPubspecResolution;
|
||||||
|
|
||||||
Future<void> buildWeb(
|
Future<void> buildWeb(
|
||||||
FlutterProject flutterProject,
|
FlutterProject flutterProject,
|
||||||
@ -116,6 +119,7 @@ class WebBuilder {
|
|||||||
// Web uses a different Dart plugin registry.
|
// Web uses a different Dart plugin registry.
|
||||||
// https://github.com/flutter/flutter/issues/80406
|
// https://github.com/flutter/flutter/issues/80406
|
||||||
generateDartPluginRegistry: false,
|
generateDartPluginRegistry: false,
|
||||||
|
useImplicitPubspecResolution: _useImplicitPubspecResolution,
|
||||||
));
|
));
|
||||||
if (!result.success) {
|
if (!result.success) {
|
||||||
for (final ExceptionMeasurement measurement in result.exceptions.values) {
|
for (final ExceptionMeasurement measurement in result.exceptions.values) {
|
||||||
|
@ -33,6 +33,7 @@ abstract class WebRunnerFactory {
|
|||||||
required SystemClock systemClock,
|
required SystemClock systemClock,
|
||||||
required Usage usage,
|
required Usage usage,
|
||||||
required Analytics analytics,
|
required Analytics analytics,
|
||||||
|
required bool useImplicitPubspecResolution,
|
||||||
bool machine = false,
|
bool machine = false,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -1260,6 +1260,7 @@ class FakeHotRunnerFactory extends Fake implements HotRunnerFactory {
|
|||||||
Analytics? analytics,
|
Analytics? analytics,
|
||||||
String? nativeAssetsYamlFile,
|
String? nativeAssetsYamlFile,
|
||||||
HotRunnerNativeAssetsBuilder? nativeAssetsBuilder,
|
HotRunnerNativeAssetsBuilder? nativeAssetsBuilder,
|
||||||
|
required bool useImplicitPubspecResolution,
|
||||||
}) {
|
}) {
|
||||||
if (_artifactTester != null) {
|
if (_artifactTester != null) {
|
||||||
for (final FlutterDevice device in devices) {
|
for (final FlutterDevice device in devices) {
|
||||||
|
@ -99,6 +99,7 @@ void main() {
|
|||||||
daemon = Daemon(
|
daemon = Daemon(
|
||||||
daemonConnection,
|
daemonConnection,
|
||||||
notifyingLogger: notifyingLogger,
|
notifyingLogger: notifyingLogger,
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
daemonStreams.inputs.add(DaemonMessage(<String, Object?>{'id': 0, 'method': 'daemon.version'}));
|
daemonStreams.inputs.add(DaemonMessage(<String, Object?>{'id': 0, 'method': 'daemon.version'}));
|
||||||
final DaemonMessage response = await daemonStreams.outputs.stream.firstWhere(_notEvent);
|
final DaemonMessage response = await daemonStreams.outputs.stream.firstWhere(_notEvent);
|
||||||
@ -111,6 +112,7 @@ void main() {
|
|||||||
daemon = Daemon(
|
daemon = Daemon(
|
||||||
daemonConnection,
|
daemonConnection,
|
||||||
notifyingLogger: notifyingLogger,
|
notifyingLogger: notifyingLogger,
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
// Use the flutter_gallery project which has a known set of supported platforms.
|
// Use the flutter_gallery project which has a known set of supported platforms.
|
||||||
final String projectPath = globals.fs.path.join(getFlutterRoot(), 'dev', 'integration_tests', 'flutter_gallery');
|
final String projectPath = globals.fs.path.join(getFlutterRoot(), 'dev', 'integration_tests', 'flutter_gallery');
|
||||||
@ -215,6 +217,7 @@ void main() {
|
|||||||
daemon = Daemon(
|
daemon = Daemon(
|
||||||
daemonConnection,
|
daemonConnection,
|
||||||
notifyingLogger: notifyingLogger,
|
notifyingLogger: notifyingLogger,
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
globals.printError('daemon.logMessage test');
|
globals.printError('daemon.logMessage test');
|
||||||
final DaemonMessage response = await daemonStreams.outputs.stream.firstWhere((DaemonMessage message) {
|
final DaemonMessage response = await daemonStreams.outputs.stream.firstWhere((DaemonMessage message) {
|
||||||
@ -233,6 +236,7 @@ void main() {
|
|||||||
daemon = Daemon(
|
daemon = Daemon(
|
||||||
daemonConnection,
|
daemonConnection,
|
||||||
notifyingLogger: notifyingLogger,
|
notifyingLogger: notifyingLogger,
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
globals.printWarning('daemon.logMessage test');
|
globals.printWarning('daemon.logMessage test');
|
||||||
final DaemonMessage response = await daemonStreams.outputs.stream.firstWhere((DaemonMessage message) {
|
final DaemonMessage response = await daemonStreams.outputs.stream.firstWhere((DaemonMessage message) {
|
||||||
@ -253,6 +257,7 @@ void main() {
|
|||||||
daemonConnection,
|
daemonConnection,
|
||||||
notifyingLogger: notifyingLogger,
|
notifyingLogger: notifyingLogger,
|
||||||
logToStdout: true,
|
logToStdout: true,
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
globals.printStatus('daemon.logMessage test');
|
globals.printStatus('daemon.logMessage test');
|
||||||
return Future<void>.value();
|
return Future<void>.value();
|
||||||
@ -269,6 +274,7 @@ void main() {
|
|||||||
daemonConnection,
|
daemonConnection,
|
||||||
notifyingLogger: notifyingLogger,
|
notifyingLogger: notifyingLogger,
|
||||||
logToStdout: true,
|
logToStdout: true,
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
globals.printBox('This is the box message', title: 'Sample title');
|
globals.printBox('This is the box message', title: 'Sample title');
|
||||||
return Future<void>.value();
|
return Future<void>.value();
|
||||||
@ -283,6 +289,7 @@ void main() {
|
|||||||
daemon = Daemon(
|
daemon = Daemon(
|
||||||
daemonConnection,
|
daemonConnection,
|
||||||
notifyingLogger: notifyingLogger,
|
notifyingLogger: notifyingLogger,
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
notifyingLogger.notifyVerbose = false;
|
notifyingLogger.notifyVerbose = false;
|
||||||
globals.printTrace('daemon.logMessage test 1');
|
globals.printTrace('daemon.logMessage test 1');
|
||||||
@ -304,6 +311,7 @@ void main() {
|
|||||||
daemon = Daemon(
|
daemon = Daemon(
|
||||||
daemonConnection,
|
daemonConnection,
|
||||||
notifyingLogger: notifyingLogger,
|
notifyingLogger: notifyingLogger,
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
expect(notifyingLogger.notifyVerbose, false);
|
expect(notifyingLogger.notifyVerbose, false);
|
||||||
|
|
||||||
@ -322,6 +330,7 @@ void main() {
|
|||||||
daemon = Daemon(
|
daemon = Daemon(
|
||||||
daemonConnection,
|
daemonConnection,
|
||||||
notifyingLogger: notifyingLogger,
|
notifyingLogger: notifyingLogger,
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
notifyingLogger.notifyVerbose = false;
|
notifyingLogger.notifyVerbose = false;
|
||||||
|
|
||||||
@ -340,6 +349,7 @@ void main() {
|
|||||||
daemon = Daemon(
|
daemon = Daemon(
|
||||||
daemonConnection,
|
daemonConnection,
|
||||||
notifyingLogger: notifyingLogger,
|
notifyingLogger: notifyingLogger,
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
daemonStreams.inputs.add(DaemonMessage(<String, Object?>{'id': 0, 'method': 'daemon.shutdown'}));
|
daemonStreams.inputs.add(DaemonMessage(<String, Object?>{'id': 0, 'method': 'daemon.shutdown'}));
|
||||||
return daemon.onExit.then<void>((int code) async {
|
return daemon.onExit.then<void>((int code) async {
|
||||||
@ -352,6 +362,7 @@ void main() {
|
|||||||
daemon = Daemon(
|
daemon = Daemon(
|
||||||
daemonConnection,
|
daemonConnection,
|
||||||
notifyingLogger: notifyingLogger,
|
notifyingLogger: notifyingLogger,
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
|
|
||||||
daemonStreams.inputs.add(DaemonMessage(<String, Object?>{'id': 0, 'method': 'app.restart'}));
|
daemonStreams.inputs.add(DaemonMessage(<String, Object?>{'id': 0, 'method': 'app.restart'}));
|
||||||
@ -364,6 +375,7 @@ void main() {
|
|||||||
daemon = Daemon(
|
daemon = Daemon(
|
||||||
daemonConnection,
|
daemonConnection,
|
||||||
notifyingLogger: notifyingLogger,
|
notifyingLogger: notifyingLogger,
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
|
|
||||||
daemonStreams.inputs.add(DaemonMessage(<String, Object?>{
|
daemonStreams.inputs.add(DaemonMessage(<String, Object?>{
|
||||||
@ -382,6 +394,7 @@ void main() {
|
|||||||
daemon = Daemon(
|
daemon = Daemon(
|
||||||
daemonConnection,
|
daemonConnection,
|
||||||
notifyingLogger: notifyingLogger,
|
notifyingLogger: notifyingLogger,
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
|
|
||||||
daemonStreams.inputs.add(DaemonMessage(<String, Object?>{'id': 0, 'method': 'app.stop'}));
|
daemonStreams.inputs.add(DaemonMessage(<String, Object?>{'id': 0, 'method': 'app.stop'}));
|
||||||
@ -394,6 +407,7 @@ void main() {
|
|||||||
daemon = Daemon(
|
daemon = Daemon(
|
||||||
daemonConnection,
|
daemonConnection,
|
||||||
notifyingLogger: notifyingLogger,
|
notifyingLogger: notifyingLogger,
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
daemonStreams.inputs.add(DaemonMessage(<String, Object?>{'id': 0, 'method': 'device.getDevices'}));
|
daemonStreams.inputs.add(DaemonMessage(<String, Object?>{'id': 0, 'method': 'device.getDevices'}));
|
||||||
final DaemonMessage response = await daemonStreams.outputs.stream.firstWhere(_notEvent);
|
final DaemonMessage response = await daemonStreams.outputs.stream.firstWhere(_notEvent);
|
||||||
@ -405,6 +419,7 @@ void main() {
|
|||||||
daemon = Daemon(
|
daemon = Daemon(
|
||||||
daemonConnection,
|
daemonConnection,
|
||||||
notifyingLogger: notifyingLogger,
|
notifyingLogger: notifyingLogger,
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
final FakePollingDeviceDiscovery discoverer = FakePollingDeviceDiscovery();
|
final FakePollingDeviceDiscovery discoverer = FakePollingDeviceDiscovery();
|
||||||
daemon.deviceDomain.addDeviceDiscoverer(discoverer);
|
daemon.deviceDomain.addDeviceDiscoverer(discoverer);
|
||||||
@ -421,6 +436,7 @@ void main() {
|
|||||||
daemon = Daemon(
|
daemon = Daemon(
|
||||||
daemonConnection,
|
daemonConnection,
|
||||||
notifyingLogger: notifyingLogger,
|
notifyingLogger: notifyingLogger,
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
|
|
||||||
final FakePollingDeviceDiscovery discoverer = FakePollingDeviceDiscovery();
|
final FakePollingDeviceDiscovery discoverer = FakePollingDeviceDiscovery();
|
||||||
@ -434,6 +450,7 @@ void main() {
|
|||||||
previewBinary: fs.file(r'preview_device.exe'),
|
previewBinary: fs.file(r'preview_device.exe'),
|
||||||
artifacts: Artifacts.test(fileSystem: fs),
|
artifacts: Artifacts.test(fileSystem: fs),
|
||||||
builderFactory: () => throw UnimplementedError('TODO implement builder factory'),
|
builderFactory: () => throw UnimplementedError('TODO implement builder factory'),
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
));
|
));
|
||||||
|
|
||||||
final List<Map<String, Object?>> names = <Map<String, Object?>>[];
|
final List<Map<String, Object?>> names = <Map<String, Object?>>[];
|
||||||
@ -504,6 +521,7 @@ void main() {
|
|||||||
daemon = Daemon(
|
daemon = Daemon(
|
||||||
daemonConnection,
|
daemonConnection,
|
||||||
notifyingLogger: notifyingLogger,
|
notifyingLogger: notifyingLogger,
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
daemonStreams.inputs.add(DaemonMessage(<String, Object?>{'id': 0, 'method': 'device.discoverDevices'}));
|
daemonStreams.inputs.add(DaemonMessage(<String, Object?>{'id': 0, 'method': 'device.discoverDevices'}));
|
||||||
final DaemonMessage response = await daemonStreams.outputs.stream.firstWhere(_notEvent);
|
final DaemonMessage response = await daemonStreams.outputs.stream.firstWhere(_notEvent);
|
||||||
@ -515,6 +533,7 @@ void main() {
|
|||||||
daemon = Daemon(
|
daemon = Daemon(
|
||||||
daemonConnection,
|
daemonConnection,
|
||||||
notifyingLogger: notifyingLogger,
|
notifyingLogger: notifyingLogger,
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
final FakePollingDeviceDiscovery discoverer = FakePollingDeviceDiscovery();
|
final FakePollingDeviceDiscovery discoverer = FakePollingDeviceDiscovery();
|
||||||
daemon.deviceDomain.addDeviceDiscoverer(discoverer);
|
daemon.deviceDomain.addDeviceDiscoverer(discoverer);
|
||||||
@ -532,6 +551,7 @@ void main() {
|
|||||||
daemon = Daemon(
|
daemon = Daemon(
|
||||||
daemonConnection,
|
daemonConnection,
|
||||||
notifyingLogger: notifyingLogger,
|
notifyingLogger: notifyingLogger,
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
final FakePollingDeviceDiscovery discoverer = FakePollingDeviceDiscovery();
|
final FakePollingDeviceDiscovery discoverer = FakePollingDeviceDiscovery();
|
||||||
daemon.deviceDomain.addDeviceDiscoverer(discoverer);
|
daemon.deviceDomain.addDeviceDiscoverer(discoverer);
|
||||||
@ -556,6 +576,7 @@ void main() {
|
|||||||
daemon = Daemon(
|
daemon = Daemon(
|
||||||
daemonConnection,
|
daemonConnection,
|
||||||
notifyingLogger: notifyingLogger,
|
notifyingLogger: notifyingLogger,
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
final FakePollingDeviceDiscovery discoverer = FakePollingDeviceDiscovery();
|
final FakePollingDeviceDiscovery discoverer = FakePollingDeviceDiscovery();
|
||||||
daemon.deviceDomain.addDeviceDiscoverer(discoverer);
|
daemon.deviceDomain.addDeviceDiscoverer(discoverer);
|
||||||
@ -607,6 +628,7 @@ void main() {
|
|||||||
daemon = Daemon(
|
daemon = Daemon(
|
||||||
daemonConnection,
|
daemonConnection,
|
||||||
notifyingLogger: notifyingLogger,
|
notifyingLogger: notifyingLogger,
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
final FakePollingDeviceDiscovery discoverer = FakePollingDeviceDiscovery();
|
final FakePollingDeviceDiscovery discoverer = FakePollingDeviceDiscovery();
|
||||||
daemon.deviceDomain.addDeviceDiscoverer(discoverer);
|
daemon.deviceDomain.addDeviceDiscoverer(discoverer);
|
||||||
@ -673,6 +695,7 @@ void main() {
|
|||||||
daemon = Daemon(
|
daemon = Daemon(
|
||||||
daemonConnection,
|
daemonConnection,
|
||||||
notifyingLogger: notifyingLogger,
|
notifyingLogger: notifyingLogger,
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
final FakePollingDeviceDiscovery discoverer = FakePollingDeviceDiscovery();
|
final FakePollingDeviceDiscovery discoverer = FakePollingDeviceDiscovery();
|
||||||
daemon.deviceDomain.addDeviceDiscoverer(discoverer);
|
daemon.deviceDomain.addDeviceDiscoverer(discoverer);
|
||||||
@ -732,6 +755,7 @@ void main() {
|
|||||||
daemon = Daemon(
|
daemon = Daemon(
|
||||||
daemonConnection,
|
daemonConnection,
|
||||||
notifyingLogger: notifyingLogger,
|
notifyingLogger: notifyingLogger,
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
final FakePollingDeviceDiscovery discoverer1 = FakePollingDeviceDiscovery();
|
final FakePollingDeviceDiscovery discoverer1 = FakePollingDeviceDiscovery();
|
||||||
discoverer1.diagnostics = <String>['fake diagnostic 1', 'fake diagnostic 2'];
|
discoverer1.diagnostics = <String>['fake diagnostic 1', 'fake diagnostic 2'];
|
||||||
@ -757,6 +781,7 @@ void main() {
|
|||||||
daemon = Daemon(
|
daemon = Daemon(
|
||||||
daemonConnection,
|
daemonConnection,
|
||||||
notifyingLogger: notifyingLogger,
|
notifyingLogger: notifyingLogger,
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
|
|
||||||
daemonStreams.inputs.add(DaemonMessage(<String, Object?>{'id': 0, 'method': 'emulator.launch'}));
|
daemonStreams.inputs.add(DaemonMessage(<String, Object?>{'id': 0, 'method': 'emulator.launch'}));
|
||||||
@ -769,6 +794,7 @@ void main() {
|
|||||||
daemon = Daemon(
|
daemon = Daemon(
|
||||||
daemonConnection,
|
daemonConnection,
|
||||||
notifyingLogger: notifyingLogger,
|
notifyingLogger: notifyingLogger,
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
final Map<String, Object?> params = <String, Object?>{'emulatorId': 'device', 'coldBoot': 1};
|
final Map<String, Object?> params = <String, Object?>{'emulatorId': 'device', 'coldBoot': 1};
|
||||||
daemonStreams.inputs.add(DaemonMessage(<String, Object?>{'id': 0, 'method': 'emulator.launch', 'params': params}));
|
daemonStreams.inputs.add(DaemonMessage(<String, Object?>{'id': 0, 'method': 'emulator.launch', 'params': params}));
|
||||||
@ -781,6 +807,7 @@ void main() {
|
|||||||
daemon = Daemon(
|
daemon = Daemon(
|
||||||
daemonConnection,
|
daemonConnection,
|
||||||
notifyingLogger: notifyingLogger,
|
notifyingLogger: notifyingLogger,
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
daemonStreams.inputs.add(DaemonMessage(<String, Object?>{'id': 0, 'method': 'emulator.getEmulators'}));
|
daemonStreams.inputs.add(DaemonMessage(<String, Object?>{'id': 0, 'method': 'emulator.getEmulators'}));
|
||||||
final DaemonMessage response = await daemonStreams.outputs.stream.firstWhere(_notEvent);
|
final DaemonMessage response = await daemonStreams.outputs.stream.firstWhere(_notEvent);
|
||||||
@ -795,6 +822,7 @@ void main() {
|
|||||||
daemon = Daemon(
|
daemon = Daemon(
|
||||||
daemonConnection,
|
daemonConnection,
|
||||||
notifyingLogger: notifyingLogger,
|
notifyingLogger: notifyingLogger,
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
|
|
||||||
// Respond to any requests from the daemon to expose a URL.
|
// Respond to any requests from the daemon to expose a URL.
|
||||||
@ -814,6 +842,7 @@ void main() {
|
|||||||
daemon = Daemon(
|
daemon = Daemon(
|
||||||
daemonConnection,
|
daemonConnection,
|
||||||
notifyingLogger: notifyingLogger,
|
notifyingLogger: notifyingLogger,
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
|
|
||||||
daemonStreams.inputs.add(DaemonMessage(<String, Object?>{'id': 0, 'method': 'devtools.serve'}));
|
daemonStreams.inputs.add(DaemonMessage(<String, Object?>{'id': 0, 'method': 'devtools.serve'}));
|
||||||
@ -830,6 +859,7 @@ void main() {
|
|||||||
daemon = Daemon(
|
daemon = Daemon(
|
||||||
daemonConnection,
|
daemonConnection,
|
||||||
notifyingLogger: notifyingLogger,
|
notifyingLogger: notifyingLogger,
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
|
|
||||||
daemonStreams.inputs.add(DaemonMessage(<String, Object?>{'id': 0, 'method': 'devtools.serve'}));
|
daemonStreams.inputs.add(DaemonMessage(<String, Object?>{'id': 0, 'method': 'devtools.serve'}));
|
||||||
@ -860,6 +890,7 @@ void main() {
|
|||||||
daemon = Daemon(
|
daemon = Daemon(
|
||||||
daemonConnection,
|
daemonConnection,
|
||||||
notifyingLogger: notifyingLogger,
|
notifyingLogger: notifyingLogger,
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
daemonStreams.inputs.add(DaemonMessage(<String, Object?>{'id': 0, 'method': 'proxy.connect', 'params': <String, Object?>{'port': 123}}));
|
daemonStreams.inputs.add(DaemonMessage(<String, Object?>{'id': 0, 'method': 'proxy.connect', 'params': <String, Object?>{'port': 123}}));
|
||||||
|
|
||||||
@ -920,6 +951,7 @@ void main() {
|
|||||||
daemon = Daemon(
|
daemon = Daemon(
|
||||||
daemonConnection,
|
daemonConnection,
|
||||||
notifyingLogger: notifyingLogger,
|
notifyingLogger: notifyingLogger,
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
daemonStreams.inputs.add(DaemonMessage(<String, Object?>{'id': 0, 'method': 'proxy.connect', 'params': <String, Object?>{'port': 123}}));
|
daemonStreams.inputs.add(DaemonMessage(<String, Object?>{'id': 0, 'method': 'proxy.connect', 'params': <String, Object?>{'port': 123}}));
|
||||||
|
|
||||||
@ -940,6 +972,7 @@ void main() {
|
|||||||
daemon = Daemon(
|
daemon = Daemon(
|
||||||
daemonConnection,
|
daemonConnection,
|
||||||
notifyingLogger: notifyingLogger,
|
notifyingLogger: notifyingLogger,
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
daemonStreams.inputs.add(DaemonMessage(<String, Object?>{'id': 0, 'method': 'proxy.connect', 'params': <String, Object?>{'port': 123}}));
|
daemonStreams.inputs.add(DaemonMessage(<String, Object?>{'id': 0, 'method': 'proxy.connect', 'params': <String, Object?>{'port': 123}}));
|
||||||
|
|
||||||
|
@ -64,7 +64,7 @@ void main() {
|
|||||||
ProcessManager: () => FakeProcessManager.any(),
|
ProcessManager: () => FakeProcessManager.any(),
|
||||||
});
|
});
|
||||||
|
|
||||||
testUsingContext('not using synthetic packages', () async {
|
testUsingContext('not using synthetic packages (explicitly)', () async {
|
||||||
final Directory l10nDirectory = fileSystem.directory(
|
final Directory l10nDirectory = fileSystem.directory(
|
||||||
fileSystem.path.join('lib', 'l10n'),
|
fileSystem.path.join('lib', 'l10n'),
|
||||||
);
|
);
|
||||||
@ -104,6 +104,46 @@ flutter:
|
|||||||
ProcessManager: () => FakeProcessManager.any(),
|
ProcessManager: () => FakeProcessManager.any(),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
testUsingContext('not using synthetic packages (due to --no-implicit-pubspec-resolution)', () async {
|
||||||
|
final Directory l10nDirectory = fileSystem.directory(
|
||||||
|
fileSystem.path.join('lib', 'l10n'),
|
||||||
|
);
|
||||||
|
final File arbFile = l10nDirectory.childFile(
|
||||||
|
'app_en.arb',
|
||||||
|
)..createSync(recursive: true);
|
||||||
|
|
||||||
|
arbFile.writeAsStringSync('''
|
||||||
|
{
|
||||||
|
"helloWorld": "Hello, World!",
|
||||||
|
"@helloWorld": {
|
||||||
|
"description": "Sample description"
|
||||||
|
}
|
||||||
|
}''');
|
||||||
|
fileSystem.file('pubspec.yaml').writeAsStringSync('''
|
||||||
|
flutter:
|
||||||
|
generate: true''');
|
||||||
|
|
||||||
|
final GenerateLocalizationsCommand command = GenerateLocalizationsCommand(
|
||||||
|
fileSystem: fileSystem,
|
||||||
|
logger: logger,
|
||||||
|
artifacts: artifacts,
|
||||||
|
processManager: processManager,
|
||||||
|
);
|
||||||
|
await createTestCommandRunner(command).run(<String>[
|
||||||
|
'--no-implicit-pubspec-resolution',
|
||||||
|
'gen-l10n',
|
||||||
|
]);
|
||||||
|
|
||||||
|
expect(l10nDirectory.existsSync(), true);
|
||||||
|
expect(l10nDirectory.childFile('app_localizations_en.dart').existsSync(),
|
||||||
|
true);
|
||||||
|
expect(
|
||||||
|
l10nDirectory.childFile('app_localizations.dart').existsSync(), true);
|
||||||
|
}, overrides: <Type, Generator>{
|
||||||
|
FileSystem: () => fileSystem,
|
||||||
|
ProcessManager: () => FakeProcessManager.any(),
|
||||||
|
});
|
||||||
|
|
||||||
testUsingContext('throws error when arguments are invalid', () async {
|
testUsingContext('throws error when arguments are invalid', () async {
|
||||||
final File arbFile = fileSystem.file(fileSystem.path.join('lib', 'l10n', 'app_en.arb'))
|
final File arbFile = fileSystem.file(fileSystem.path.join('lib', 'l10n', 'app_en.arb'))
|
||||||
..createSync(recursive: true);
|
..createSync(recursive: true);
|
||||||
|
@ -71,6 +71,7 @@ void main() {
|
|||||||
daemon = Daemon(
|
daemon = Daemon(
|
||||||
serverDaemonConnection,
|
serverDaemonConnection,
|
||||||
notifyingLogger: notifyingLogger,
|
notifyingLogger: notifyingLogger,
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
fakeDevice = FakeAndroidDevice();
|
fakeDevice = FakeAndroidDevice();
|
||||||
final FakePollingDeviceDiscovery discoverer = FakePollingDeviceDiscovery();
|
final FakePollingDeviceDiscovery discoverer = FakePollingDeviceDiscovery();
|
||||||
@ -92,6 +93,7 @@ void main() {
|
|||||||
daemon = Daemon(
|
daemon = Daemon(
|
||||||
serverDaemonConnection,
|
serverDaemonConnection,
|
||||||
notifyingLogger: notifyingLogger,
|
notifyingLogger: notifyingLogger,
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
fakeDevice = FakeAndroidDevice();
|
fakeDevice = FakeAndroidDevice();
|
||||||
final FakePollingDeviceDiscovery discoverer = FakePollingDeviceDiscovery();
|
final FakePollingDeviceDiscovery discoverer = FakePollingDeviceDiscovery();
|
||||||
@ -114,6 +116,7 @@ void main() {
|
|||||||
daemon = Daemon(
|
daemon = Daemon(
|
||||||
serverDaemonConnection,
|
serverDaemonConnection,
|
||||||
notifyingLogger: notifyingLogger,
|
notifyingLogger: notifyingLogger,
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
fakeDevice = FakeAndroidDevice();
|
fakeDevice = FakeAndroidDevice();
|
||||||
final FakePollingDeviceDiscovery discoverer = FakePollingDeviceDiscovery();
|
final FakePollingDeviceDiscovery discoverer = FakePollingDeviceDiscovery();
|
||||||
@ -144,6 +147,7 @@ void main() {
|
|||||||
daemon = Daemon(
|
daemon = Daemon(
|
||||||
serverDaemonConnection,
|
serverDaemonConnection,
|
||||||
notifyingLogger: notifyingLogger,
|
notifyingLogger: notifyingLogger,
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
fakeDevice = FakeAndroidDevice();
|
fakeDevice = FakeAndroidDevice();
|
||||||
final FakePollingDeviceDiscovery discoverer = FakePollingDeviceDiscovery();
|
final FakePollingDeviceDiscovery discoverer = FakePollingDeviceDiscovery();
|
||||||
@ -197,6 +201,7 @@ void main() {
|
|||||||
daemon = Daemon(
|
daemon = Daemon(
|
||||||
serverDaemonConnection,
|
serverDaemonConnection,
|
||||||
notifyingLogger: notifyingLogger,
|
notifyingLogger: notifyingLogger,
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
fakeDevice = FakeAndroidDevice();
|
fakeDevice = FakeAndroidDevice();
|
||||||
final FakePollingDeviceDiscovery discoverer = FakePollingDeviceDiscovery();
|
final FakePollingDeviceDiscovery discoverer = FakePollingDeviceDiscovery();
|
||||||
|
@ -1584,14 +1584,14 @@ class DaemonCapturingRunCommand extends RunCommand {
|
|||||||
@override
|
@override
|
||||||
Daemon createMachineDaemon() {
|
Daemon createMachineDaemon() {
|
||||||
daemon = super.createMachineDaemon();
|
daemon = super.createMachineDaemon();
|
||||||
appDomain = daemon.appDomain = CapturingAppDomain(daemon);
|
appDomain = daemon.appDomain = CapturingAppDomain(daemon, useImplicitPubspecResolution: true);
|
||||||
daemon.registerDomain(appDomain);
|
daemon.registerDomain(appDomain);
|
||||||
return daemon;
|
return daemon;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class CapturingAppDomain extends AppDomain {
|
class CapturingAppDomain extends AppDomain {
|
||||||
CapturingAppDomain(super.daemon);
|
CapturingAppDomain(super.daemon, {required super.useImplicitPubspecResolution});
|
||||||
|
|
||||||
String? userIdentifier;
|
String? userIdentifier;
|
||||||
bool? enableDevTools;
|
bool? enableDevTools;
|
||||||
|
@ -544,5 +544,6 @@ class FakeBundleBuilder extends Fake implements BundleBuilder {
|
|||||||
String? assetDirPath,
|
String? assetDirPath,
|
||||||
bool buildNativeAssets = true,
|
bool buildNativeAssets = true,
|
||||||
@visibleForTesting BuildSystem? buildSystem,
|
@visibleForTesting BuildSystem? buildSystem,
|
||||||
|
required bool useImplicitPubspecResolution,
|
||||||
}) async {}
|
}) async {}
|
||||||
}
|
}
|
||||||
|
@ -53,6 +53,7 @@ nullable-getter: false
|
|||||||
file: configFile,
|
file: configFile,
|
||||||
logger: BufferLogger.test(),
|
logger: BufferLogger.test(),
|
||||||
defaultArbDir: fileSystem.path.join('lib', 'l10n'),
|
defaultArbDir: fileSystem.path.join('lib', 'l10n'),
|
||||||
|
defaultSyntheticPackage: true,
|
||||||
);
|
);
|
||||||
|
|
||||||
expect(options.arbDir, Uri.parse('arb').path);
|
expect(options.arbDir, Uri.parse('arb').path);
|
||||||
@ -69,6 +70,65 @@ nullable-getter: false
|
|||||||
expect(options.nullableGetter, false);
|
expect(options.nullableGetter, false);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
testWithoutContext(
|
||||||
|
'parseLocalizationsOptions uses defaultSyntheticPackage = true', () async {
|
||||||
|
final FileSystem fileSystem = MemoryFileSystem.test();
|
||||||
|
final File configFile = fileSystem.file('l10n.yaml')..writeAsStringSync('''
|
||||||
|
arb-dir: arb
|
||||||
|
template-arb-file: example.arb
|
||||||
|
output-localization-file: bar
|
||||||
|
untranslated-messages-file: untranslated
|
||||||
|
output-class: Foo
|
||||||
|
header-file: header
|
||||||
|
header: HEADER
|
||||||
|
use-deferred-loading: true
|
||||||
|
preferred-supported-locales: en_US
|
||||||
|
# Intentionally omitted
|
||||||
|
# synthetic-package: ...
|
||||||
|
required-resource-attributes: false
|
||||||
|
nullable-getter: false
|
||||||
|
''');
|
||||||
|
|
||||||
|
final LocalizationOptions options = parseLocalizationsOptionsFromYAML(
|
||||||
|
file: configFile,
|
||||||
|
logger: BufferLogger.test(),
|
||||||
|
defaultArbDir: fileSystem.path.join('lib', 'l10n'),
|
||||||
|
defaultSyntheticPackage: true,
|
||||||
|
);
|
||||||
|
|
||||||
|
expect(options.syntheticPackage, true);
|
||||||
|
});
|
||||||
|
|
||||||
|
testWithoutContext(
|
||||||
|
'parseLocalizationsOptions uses defaultSyntheticPackage = false',
|
||||||
|
() async {
|
||||||
|
final FileSystem fileSystem = MemoryFileSystem.test();
|
||||||
|
final File configFile = fileSystem.file('l10n.yaml')..writeAsStringSync('''
|
||||||
|
arb-dir: arb
|
||||||
|
template-arb-file: example.arb
|
||||||
|
output-localization-file: bar
|
||||||
|
untranslated-messages-file: untranslated
|
||||||
|
output-class: Foo
|
||||||
|
header-file: header
|
||||||
|
header: HEADER
|
||||||
|
use-deferred-loading: true
|
||||||
|
preferred-supported-locales: en_US
|
||||||
|
# Intentionally omitted
|
||||||
|
# synthetic-package: ...
|
||||||
|
required-resource-attributes: false
|
||||||
|
nullable-getter: false
|
||||||
|
''');
|
||||||
|
|
||||||
|
final LocalizationOptions options = parseLocalizationsOptionsFromYAML(
|
||||||
|
file: configFile,
|
||||||
|
logger: BufferLogger.test(),
|
||||||
|
defaultArbDir: fileSystem.path.join('lib', 'l10n'),
|
||||||
|
defaultSyntheticPackage: false,
|
||||||
|
);
|
||||||
|
|
||||||
|
expect(options.syntheticPackage, false);
|
||||||
|
});
|
||||||
|
|
||||||
testWithoutContext('parseLocalizationsOptions handles preferredSupportedLocales as list', () async {
|
testWithoutContext('parseLocalizationsOptions handles preferredSupportedLocales as list', () async {
|
||||||
final FileSystem fileSystem = MemoryFileSystem.test();
|
final FileSystem fileSystem = MemoryFileSystem.test();
|
||||||
final File configFile = fileSystem.file('l10n.yaml')..writeAsStringSync('''
|
final File configFile = fileSystem.file('l10n.yaml')..writeAsStringSync('''
|
||||||
@ -79,6 +139,7 @@ preferred-supported-locales: ['en_US', 'de']
|
|||||||
file: configFile,
|
file: configFile,
|
||||||
logger: BufferLogger.test(),
|
logger: BufferLogger.test(),
|
||||||
defaultArbDir: fileSystem.path.join('lib', 'l10n'),
|
defaultArbDir: fileSystem.path.join('lib', 'l10n'),
|
||||||
|
defaultSyntheticPackage: true,
|
||||||
);
|
);
|
||||||
|
|
||||||
expect(options.preferredSupportedLocales, <String>['en_US', 'de']);
|
expect(options.preferredSupportedLocales, <String>['en_US', 'de']);
|
||||||
@ -97,6 +158,7 @@ use-deferred-loading: string
|
|||||||
file: configFile,
|
file: configFile,
|
||||||
logger: BufferLogger.test(),
|
logger: BufferLogger.test(),
|
||||||
defaultArbDir: fileSystem.path.join('lib', 'l10n'),
|
defaultArbDir: fileSystem.path.join('lib', 'l10n'),
|
||||||
|
defaultSyntheticPackage: true,
|
||||||
),
|
),
|
||||||
throwsException,
|
throwsException,
|
||||||
);
|
);
|
||||||
@ -113,6 +175,7 @@ template-arb-file: {name}_en.arb
|
|||||||
file: configFile,
|
file: configFile,
|
||||||
logger: BufferLogger.test(),
|
logger: BufferLogger.test(),
|
||||||
defaultArbDir: fileSystem.path.join('lib', 'l10n'),
|
defaultArbDir: fileSystem.path.join('lib', 'l10n'),
|
||||||
|
defaultSyntheticPackage: true,
|
||||||
),
|
),
|
||||||
throwsToolExit(),
|
throwsToolExit(),
|
||||||
);
|
);
|
||||||
|
@ -47,7 +47,8 @@ void main() {
|
|||||||
mainPath: globals.fs.path.join('lib', 'main.dart'),
|
mainPath: globals.fs.path.join('lib', 'main.dart'),
|
||||||
assetDirPath: 'example',
|
assetDirPath: 'example',
|
||||||
depfilePath: 'example.d',
|
depfilePath: 'example.d',
|
||||||
buildSystem: buildSystem
|
buildSystem: buildSystem,
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
expect(globals.fs.file(globals.fs.path.join('example', 'kernel_blob.bin')).existsSync(), true);
|
expect(globals.fs.file(globals.fs.path.join('example', 'kernel_blob.bin')).existsSync(), true);
|
||||||
expect(globals.fs.file(globals.fs.path.join('example', 'LICENSE')).existsSync(), true);
|
expect(globals.fs.file(globals.fs.path.join('example', 'LICENSE')).existsSync(), true);
|
||||||
@ -136,7 +137,8 @@ void main() {
|
|||||||
mainPath: 'lib/main.dart',
|
mainPath: 'lib/main.dart',
|
||||||
assetDirPath: 'example',
|
assetDirPath: 'example',
|
||||||
depfilePath: 'example.d',
|
depfilePath: 'example.d',
|
||||||
buildSystem: TestBuildSystem.all(BuildResult(success: false))
|
buildSystem: TestBuildSystem.all(BuildResult(success: false)),
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
),
|
),
|
||||||
throwsToolExit()
|
throwsToolExit()
|
||||||
);
|
);
|
||||||
@ -181,7 +183,8 @@ void main() {
|
|||||||
mainPath: mainPath,
|
mainPath: mainPath,
|
||||||
assetDirPath: assetDirPath,
|
assetDirPath: assetDirPath,
|
||||||
depfilePath: depfilePath,
|
depfilePath: depfilePath,
|
||||||
buildSystem: buildSystem
|
buildSystem: buildSystem,
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
|
|
||||||
expect(env, isNotNull);
|
expect(env, isNotNull);
|
||||||
|
@ -42,6 +42,7 @@ void main() {
|
|||||||
final int exitCode = await ColdRunner(devices,
|
final int exitCode = await ColdRunner(devices,
|
||||||
debuggingOptions: DebuggingOptions.enabled(BuildInfo.debug),
|
debuggingOptions: DebuggingOptions.enabled(BuildInfo.debug),
|
||||||
target: 'main.dart',
|
target: 'main.dart',
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
).attach();
|
).attach();
|
||||||
expect(exitCode, 2);
|
expect(exitCode, 2);
|
||||||
});
|
});
|
||||||
@ -58,6 +59,7 @@ void main() {
|
|||||||
await ColdRunner(devices,
|
await ColdRunner(devices,
|
||||||
debuggingOptions: DebuggingOptions.enabled(BuildInfo.debug),
|
debuggingOptions: DebuggingOptions.enabled(BuildInfo.debug),
|
||||||
target: 'main.dart',
|
target: 'main.dart',
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
).cleanupAtFinish();
|
).cleanupAtFinish();
|
||||||
|
|
||||||
expect(flutterDevice1.stopEchoingDeviceLogCount, 1);
|
expect(flutterDevice1.stopEchoingDeviceLogCount, 1);
|
||||||
@ -87,6 +89,7 @@ void main() {
|
|||||||
applicationBinary: applicationBinary,
|
applicationBinary: applicationBinary,
|
||||||
debuggingOptions: DebuggingOptions.enabled(BuildInfo.debug),
|
debuggingOptions: DebuggingOptions.enabled(BuildInfo.debug),
|
||||||
target: 'main.dart',
|
target: 'main.dart',
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
).run();
|
).run();
|
||||||
|
|
||||||
expect(result, 1);
|
expect(result, 1);
|
||||||
@ -103,6 +106,7 @@ void main() {
|
|||||||
debuggingOptions: DebuggingOptions.disabled(BuildInfo.debug),
|
debuggingOptions: DebuggingOptions.disabled(BuildInfo.debug),
|
||||||
target: 'main.dart',
|
target: 'main.dart',
|
||||||
traceStartup: true,
|
traceStartup: true,
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
).run();
|
).run();
|
||||||
|
|
||||||
expect(result, 0);
|
expect(result, 0);
|
||||||
@ -126,6 +130,7 @@ void main() {
|
|||||||
debuggingOptions: DebuggingOptions.disabled(BuildInfo.debug),
|
debuggingOptions: DebuggingOptions.disabled(BuildInfo.debug),
|
||||||
target: 'main.dart',
|
target: 'main.dart',
|
||||||
traceStartup: true,
|
traceStartup: true,
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
).run();
|
).run();
|
||||||
|
|
||||||
expect(result, 0);
|
expect(result, 0);
|
||||||
|
@ -29,6 +29,7 @@ void main() {
|
|||||||
bindPorts.add(port);
|
bindPorts.add(port);
|
||||||
return socket;
|
return socket;
|
||||||
},
|
},
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
await server.run();
|
await server.run();
|
||||||
expect(bindCalledTimes, 1);
|
expect(bindCalledTimes, 1);
|
||||||
@ -56,6 +57,7 @@ void main() {
|
|||||||
}
|
}
|
||||||
return socket;
|
return socket;
|
||||||
},
|
},
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
await server.run();
|
await server.run();
|
||||||
expect(bindCalledTimes, 2);
|
expect(bindCalledTimes, 2);
|
||||||
|
@ -122,7 +122,8 @@ void main() {
|
|||||||
final CustomDevice device = CustomDevice(
|
final CustomDevice device = CustomDevice(
|
||||||
config: testConfig,
|
config: testConfig,
|
||||||
processManager: FakeProcessManager.any(),
|
processManager: FakeProcessManager.any(),
|
||||||
logger: BufferLogger.test()
|
logger: BufferLogger.test(),
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
|
|
||||||
final PrebuiltLinuxApp linuxApp = PrebuiltLinuxApp(executable: 'foo');
|
final PrebuiltLinuxApp linuxApp = PrebuiltLinuxApp(executable: 'foo');
|
||||||
@ -165,7 +166,8 @@ void main() {
|
|||||||
fileSystem: fs,
|
fileSystem: fs,
|
||||||
directory: dir,
|
directory: dir,
|
||||||
logger: BufferLogger.test()
|
logger: BufferLogger.test()
|
||||||
)
|
),
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
).devices(), <Device>[]);
|
).devices(), <Device>[]);
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -183,7 +185,8 @@ void main() {
|
|||||||
fileSystem: fs,
|
fileSystem: fs,
|
||||||
directory: dir,
|
directory: dir,
|
||||||
logger: BufferLogger.test()
|
logger: BufferLogger.test()
|
||||||
)
|
),
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
).devices(), <Device>[]);
|
).devices(), <Device>[]);
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -207,7 +210,8 @@ void main() {
|
|||||||
fileSystem: fs,
|
fileSystem: fs,
|
||||||
directory: dir,
|
directory: dir,
|
||||||
logger: BufferLogger.test()
|
logger: BufferLogger.test()
|
||||||
)
|
),
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
).devices(),
|
).devices(),
|
||||||
hasLength(1)
|
hasLength(1)
|
||||||
);
|
);
|
||||||
@ -236,6 +240,7 @@ void main() {
|
|||||||
directory: dir,
|
directory: dir,
|
||||||
logger: BufferLogger.test(),
|
logger: BufferLogger.test(),
|
||||||
),
|
),
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
|
|
||||||
final List<Device> discoveredDevices = await discovery.discoverDevices();
|
final List<Device> discoveredDevices = await discovery.discoverDevices();
|
||||||
@ -265,6 +270,7 @@ void main() {
|
|||||||
directory: dir,
|
directory: dir,
|
||||||
logger: BufferLogger.test(),
|
logger: BufferLogger.test(),
|
||||||
),
|
),
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
|
|
||||||
expect(await discovery.discoverDevices(), hasLength(0));
|
expect(await discovery.discoverDevices(), hasLength(0));
|
||||||
@ -289,6 +295,7 @@ void main() {
|
|||||||
directory: dir,
|
directory: dir,
|
||||||
logger: BufferLogger.test(),
|
logger: BufferLogger.test(),
|
||||||
),
|
),
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
|
|
||||||
expect(await discovery.discoverDevices(), hasLength(0));
|
expect(await discovery.discoverDevices(), hasLength(0));
|
||||||
@ -308,6 +315,7 @@ void main() {
|
|||||||
config: testConfig,
|
config: testConfig,
|
||||||
logger: BufferLogger.test(),
|
logger: BufferLogger.test(),
|
||||||
processManager: FakeProcessManager.any(),
|
processManager: FakeProcessManager.any(),
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
).isSupportedForProject(flutterProject), true);
|
).isSupportedForProject(flutterProject), true);
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -317,12 +325,13 @@ void main() {
|
|||||||
bool bothCommandsWereExecuted = false;
|
bool bothCommandsWereExecuted = false;
|
||||||
|
|
||||||
final CustomDevice device = CustomDevice(
|
final CustomDevice device = CustomDevice(
|
||||||
config: testConfig,
|
config: testConfig,
|
||||||
logger: BufferLogger.test(),
|
logger: BufferLogger.test(),
|
||||||
processManager: FakeProcessManager.list(<FakeCommand>[
|
processManager: FakeProcessManager.list(<FakeCommand>[
|
||||||
FakeCommand(command: testConfig.uninstallCommand),
|
FakeCommand(command: testConfig.uninstallCommand),
|
||||||
FakeCommand(command: testConfig.installCommand, onRun: (_) => bothCommandsWereExecuted = true),
|
FakeCommand(command: testConfig.installCommand, onRun: (_) => bothCommandsWereExecuted = true),
|
||||||
])
|
]),
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
|
|
||||||
expect(await device.installApp(PrebuiltLinuxApp(executable: 'exe')), true);
|
expect(await device.installApp(PrebuiltLinuxApp(executable: 'exe')), true);
|
||||||
@ -384,7 +393,8 @@ void main() {
|
|||||||
device: CustomDevice(
|
device: CustomDevice(
|
||||||
config: testConfig,
|
config: testConfig,
|
||||||
logger: BufferLogger.test(),
|
logger: BufferLogger.test(),
|
||||||
processManager: processManager
|
processManager: processManager,
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
),
|
),
|
||||||
appPackage: PrebuiltLinuxApp(executable: 'testexecutable'),
|
appPackage: PrebuiltLinuxApp(executable: 'testexecutable'),
|
||||||
logger: BufferLogger.test(),
|
logger: BufferLogger.test(),
|
||||||
@ -421,7 +431,8 @@ void main() {
|
|||||||
device: CustomDevice(
|
device: CustomDevice(
|
||||||
config: testConfigNonForwarding,
|
config: testConfigNonForwarding,
|
||||||
logger: BufferLogger.test(),
|
logger: BufferLogger.test(),
|
||||||
processManager: processManager
|
processManager: processManager,
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
),
|
),
|
||||||
appPackage: PrebuiltLinuxApp(executable: 'testexecutable'),
|
appPackage: PrebuiltLinuxApp(executable: 'testexecutable'),
|
||||||
logger: BufferLogger.test(),
|
logger: BufferLogger.test(),
|
||||||
@ -486,7 +497,8 @@ void main() {
|
|||||||
fileSystem: fs,
|
fileSystem: fs,
|
||||||
directory: configFileDir,
|
directory: configFileDir,
|
||||||
logger: BufferLogger.test()
|
logger: BufferLogger.test()
|
||||||
)
|
),
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
|
|
||||||
final List<Device> devices = await customDevices.discoverDevices();
|
final List<Device> devices = await customDevices.discoverDevices();
|
||||||
@ -535,7 +547,8 @@ void main() {
|
|||||||
final CustomDevice device = CustomDevice(
|
final CustomDevice device = CustomDevice(
|
||||||
config: testConfig,
|
config: testConfig,
|
||||||
logger: BufferLogger.test(),
|
logger: BufferLogger.test(),
|
||||||
processManager: processManager
|
processManager: processManager,
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
|
|
||||||
expect(device.supportsScreenshot, true);
|
expect(device.supportsScreenshot, true);
|
||||||
@ -563,7 +576,8 @@ void main() {
|
|||||||
explicitScreenshotCommand: true
|
explicitScreenshotCommand: true
|
||||||
),
|
),
|
||||||
logger: BufferLogger.test(),
|
logger: BufferLogger.test(),
|
||||||
processManager: processManager
|
processManager: processManager,
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
|
|
||||||
expect(device.supportsScreenshot, false);
|
expect(device.supportsScreenshot, false);
|
||||||
@ -581,7 +595,8 @@ void main() {
|
|||||||
platform: TargetPlatform.linux_x64
|
platform: TargetPlatform.linux_x64
|
||||||
),
|
),
|
||||||
logger: BufferLogger.test(),
|
logger: BufferLogger.test(),
|
||||||
processManager: FakeProcessManager.empty()
|
processManager: FakeProcessManager.empty(),
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
|
|
||||||
expect(await device.targetPlatform, TargetPlatform.linux_x64);
|
expect(await device.targetPlatform, TargetPlatform.linux_x64);
|
||||||
@ -649,6 +664,7 @@ class FakeBundleBuilder extends Fake implements BundleBuilder {
|
|||||||
String? assetDirPath,
|
String? assetDirPath,
|
||||||
Uri? nativeAssets,
|
Uri? nativeAssets,
|
||||||
bool buildNativeAssets = true,
|
bool buildNativeAssets = true,
|
||||||
|
required bool useImplicitPubspecResolution,
|
||||||
@visibleForTesting BuildSystem? buildSystem
|
@visibleForTesting BuildSystem? buildSystem
|
||||||
}) async {}
|
}) async {}
|
||||||
}
|
}
|
||||||
|
@ -318,6 +318,7 @@ class FakeWebRunnerFactory implements WebRunnerFactory {
|
|||||||
Usage? usage,
|
Usage? usage,
|
||||||
Analytics? analytics,
|
Analytics? analytics,
|
||||||
bool machine = false,
|
bool machine = false,
|
||||||
|
required bool useImplicitPubspecResolution,
|
||||||
}) {
|
}) {
|
||||||
expect(stayResident, isTrue);
|
expect(stayResident, isTrue);
|
||||||
return FakeResidentRunner(
|
return FakeResidentRunner(
|
||||||
@ -381,6 +382,7 @@ WebDriverService setUpDriverService() {
|
|||||||
processManager: FakeProcessManager.any(),
|
processManager: FakeProcessManager.any(),
|
||||||
),
|
),
|
||||||
dartSdkPath: 'dart',
|
dartSdkPath: 'dart',
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -149,6 +149,7 @@ void main() {
|
|||||||
debuggingOptions: DebuggingOptions.disabled(BuildInfo.debug),
|
debuggingOptions: DebuggingOptions.disabled(BuildInfo.debug),
|
||||||
target: 'main.dart',
|
target: 'main.dart',
|
||||||
devtoolsHandler: createNoOpHandler,
|
devtoolsHandler: createNoOpHandler,
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
analytics: fakeAnalytics,
|
analytics: fakeAnalytics,
|
||||||
).restart(fullRestart: true);
|
).restart(fullRestart: true);
|
||||||
expect(result.isOk, false);
|
expect(result.isOk, false);
|
||||||
@ -181,6 +182,7 @@ void main() {
|
|||||||
debuggingOptions: DebuggingOptions.disabled(BuildInfo.debug),
|
debuggingOptions: DebuggingOptions.disabled(BuildInfo.debug),
|
||||||
target: 'main.dart',
|
target: 'main.dart',
|
||||||
devtoolsHandler: createNoOpHandler,
|
devtoolsHandler: createNoOpHandler,
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
reassembleHelper: (
|
reassembleHelper: (
|
||||||
List<FlutterDevice?> flutterDevices,
|
List<FlutterDevice?> flutterDevices,
|
||||||
Map<FlutterDevice?, List<FlutterView>> viewCache,
|
Map<FlutterDevice?, List<FlutterView>> viewCache,
|
||||||
@ -230,6 +232,7 @@ void main() {
|
|||||||
debuggingOptions: DebuggingOptions.disabled(BuildInfo.debug),
|
debuggingOptions: DebuggingOptions.disabled(BuildInfo.debug),
|
||||||
target: 'main.dart',
|
target: 'main.dart',
|
||||||
analytics: fakeAnalytics,
|
analytics: fakeAnalytics,
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
).cleanupAfterSignal();
|
).cleanupAfterSignal();
|
||||||
expect(shutdownTestingConfig.shutdownHookCalled, true);
|
expect(shutdownTestingConfig.shutdownHookCalled, true);
|
||||||
}, overrides: <Type, Generator>{
|
}, overrides: <Type, Generator>{
|
||||||
@ -258,6 +261,7 @@ void main() {
|
|||||||
debuggingOptions: DebuggingOptions.disabled(BuildInfo.debug),
|
debuggingOptions: DebuggingOptions.disabled(BuildInfo.debug),
|
||||||
target: 'main.dart',
|
target: 'main.dart',
|
||||||
analytics: fakeAnalytics,
|
analytics: fakeAnalytics,
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
).preExit();
|
).preExit();
|
||||||
expect(shutdownTestingConfig.shutdownHookCalled, true);
|
expect(shutdownTestingConfig.shutdownHookCalled, true);
|
||||||
}, overrides: <Type, Generator>{
|
}, overrides: <Type, Generator>{
|
||||||
@ -308,6 +312,7 @@ void main() {
|
|||||||
devtoolsHandler: createNoOpHandler,
|
devtoolsHandler: createNoOpHandler,
|
||||||
stopwatchFactory: fakeStopwatchFactory,
|
stopwatchFactory: fakeStopwatchFactory,
|
||||||
analytics: fakeAnalytics,
|
analytics: fakeAnalytics,
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
).restart(fullRestart: true);
|
).restart(fullRestart: true);
|
||||||
|
|
||||||
expect(result.isOk, true);
|
expect(result.isOk, true);
|
||||||
@ -395,6 +400,7 @@ void main() {
|
|||||||
devtoolsHandler: createNoOpHandler,
|
devtoolsHandler: createNoOpHandler,
|
||||||
stopwatchFactory: fakeStopwatchFactory,
|
stopwatchFactory: fakeStopwatchFactory,
|
||||||
analytics: fakeAnalytics,
|
analytics: fakeAnalytics,
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
reloadSourcesHelper: (
|
reloadSourcesHelper: (
|
||||||
HotRunner hotRunner,
|
HotRunner hotRunner,
|
||||||
List<FlutterDevice?> flutterDevices,
|
List<FlutterDevice?> flutterDevices,
|
||||||
@ -501,6 +507,7 @@ void main() {
|
|||||||
target: 'main.dart',
|
target: 'main.dart',
|
||||||
devtoolsHandler: createNoOpHandler,
|
devtoolsHandler: createNoOpHandler,
|
||||||
analytics: fakeAnalytics,
|
analytics: fakeAnalytics,
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
|
|
||||||
await expectLater(runner.restart(fullRestart: true), throwsA(isA<Exception>().having((Exception e) => e.toString(), 'message', 'Exception: updateDevFS failed')));
|
await expectLater(runner.restart(fullRestart: true), throwsA(isA<Exception>().having((Exception e) => e.toString(), 'message', 'Exception: updateDevFS failed')));
|
||||||
@ -536,6 +543,7 @@ void main() {
|
|||||||
target: 'main.dart',
|
target: 'main.dart',
|
||||||
devtoolsHandler: createNoOpHandler,
|
devtoolsHandler: createNoOpHandler,
|
||||||
analytics: fakeAnalytics,
|
analytics: fakeAnalytics,
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
|
|
||||||
await expectLater(runner.restart(), throwsA(isA<Exception>().having((Exception e) => e.toString(), 'message', 'Exception: updateDevFS failed')));
|
await expectLater(runner.restart(), throwsA(isA<Exception>().having((Exception e) => e.toString(), 'message', 'Exception: updateDevFS failed')));
|
||||||
@ -589,6 +597,7 @@ void main() {
|
|||||||
debuggingOptions: DebuggingOptions.enabled(BuildInfo.debug),
|
debuggingOptions: DebuggingOptions.enabled(BuildInfo.debug),
|
||||||
target: 'main.dart',
|
target: 'main.dart',
|
||||||
analytics: fakeAnalytics,
|
analytics: fakeAnalytics,
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
).attach(needsFullRestart: false);
|
).attach(needsFullRestart: false);
|
||||||
expect(exitCode, 2);
|
expect(exitCode, 2);
|
||||||
}, overrides: <Type, Generator>{
|
}, overrides: <Type, Generator>{
|
||||||
@ -627,6 +636,7 @@ void main() {
|
|||||||
debuggingOptions: DebuggingOptions.enabled(BuildInfo.debug),
|
debuggingOptions: DebuggingOptions.enabled(BuildInfo.debug),
|
||||||
target: 'main.dart',
|
target: 'main.dart',
|
||||||
analytics: fakeAnalytics,
|
analytics: fakeAnalytics,
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
).cleanupAtFinish();
|
).cleanupAtFinish();
|
||||||
|
|
||||||
expect(device1.disposed, true);
|
expect(device1.disposed, true);
|
||||||
|
@ -89,6 +89,7 @@ void main() {
|
|||||||
devtoolsHandler: createNoOpHandler,
|
devtoolsHandler: createNoOpHandler,
|
||||||
nativeAssetsBuilder: FakeHotRunnerNativeAssetsBuilder(buildRunner),
|
nativeAssetsBuilder: FakeHotRunnerNativeAssetsBuilder(buildRunner),
|
||||||
analytics: fakeAnalytics,
|
analytics: fakeAnalytics,
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
final OperationResult result = await hotRunner.restart(fullRestart: true);
|
final OperationResult result = await hotRunner.restart(fullRestart: true);
|
||||||
expect(result.isOk, true);
|
expect(result.isOk, true);
|
||||||
@ -157,6 +158,7 @@ void main() {
|
|||||||
devtoolsHandler: createNoOpHandler,
|
devtoolsHandler: createNoOpHandler,
|
||||||
nativeAssetsBuilder: FakeHotRunnerNativeAssetsBuilder(buildRunner),
|
nativeAssetsBuilder: FakeHotRunnerNativeAssetsBuilder(buildRunner),
|
||||||
analytics: fakeAnalytics,
|
analytics: fakeAnalytics,
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
expect(
|
expect(
|
||||||
() => hotRunner.run(),
|
() => hotRunner.run(),
|
||||||
|
@ -74,6 +74,7 @@ void main() {
|
|||||||
nativeAssetsBuilder: FakeHotRunnerNativeAssetsBuilder(buildRunner),
|
nativeAssetsBuilder: FakeHotRunnerNativeAssetsBuilder(buildRunner),
|
||||||
analytics: FakeAnalytics(),
|
analytics: FakeAnalytics(),
|
||||||
nativeAssetsYamlFile: 'foo.yaml',
|
nativeAssetsYamlFile: 'foo.yaml',
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
|
|
||||||
final int result = await residentRunner.run();
|
final int result = await residentRunner.run();
|
||||||
|
@ -49,6 +49,7 @@ void main() {
|
|||||||
processManager: FakeProcessManager.any(),
|
processManager: FakeProcessManager.any(),
|
||||||
previewBinary: previewBinary,
|
previewBinary: previewBinary,
|
||||||
logger: BufferLogger.test(),
|
logger: BufferLogger.test(),
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
|
|
||||||
expect(await device.isLocalEmulator, false);
|
expect(await device.isLocalEmulator, false);
|
||||||
@ -84,6 +85,7 @@ void main() {
|
|||||||
]),
|
]),
|
||||||
logger: logger,
|
logger: logger,
|
||||||
builderFactory: () => FakeBundleBuilder(fs),
|
builderFactory: () => FakeBundleBuilder(fs),
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
final Directory previewDeviceCacheDir = fs
|
final Directory previewDeviceCacheDir = fs
|
||||||
.directory('Artifact.windowsDesktopPath.TargetPlatform.windows_x64.debug')
|
.directory('Artifact.windowsDesktopPath.TargetPlatform.windows_x64.debug')
|
||||||
@ -121,6 +123,7 @@ void main() {
|
|||||||
processManager: processManager,
|
processManager: processManager,
|
||||||
platform: linuxPlatform,
|
platform: linuxPlatform,
|
||||||
featureFlags: featureFlags,
|
featureFlags: featureFlags,
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
|
|
||||||
final List<Device> devices = await discovery.devices();
|
final List<Device> devices = await discovery.devices();
|
||||||
@ -136,6 +139,7 @@ void main() {
|
|||||||
processManager: processManager,
|
processManager: processManager,
|
||||||
platform: macPlatform,
|
platform: macPlatform,
|
||||||
featureFlags: featureFlags,
|
featureFlags: featureFlags,
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
|
|
||||||
final List<Device> devices = await discovery.devices();
|
final List<Device> devices = await discovery.devices();
|
||||||
@ -153,6 +157,7 @@ void main() {
|
|||||||
processManager: processManager,
|
processManager: processManager,
|
||||||
platform: windowsPlatform,
|
platform: windowsPlatform,
|
||||||
featureFlags: featureFlags,
|
featureFlags: featureFlags,
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
|
|
||||||
final List<Device> devices = await discovery.devices();
|
final List<Device> devices = await discovery.devices();
|
||||||
@ -170,6 +175,7 @@ void main() {
|
|||||||
processManager: processManager,
|
processManager: processManager,
|
||||||
platform: windowsPlatform,
|
platform: windowsPlatform,
|
||||||
featureFlags: featureFlags,
|
featureFlags: featureFlags,
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
|
|
||||||
final List<Device> devices = await discovery.devices();
|
final List<Device> devices = await discovery.devices();
|
||||||
@ -197,7 +203,8 @@ class FakeBundleBuilder extends Fake implements BundleBuilder {
|
|||||||
String? depfilePath,
|
String? depfilePath,
|
||||||
String? assetDirPath,
|
String? assetDirPath,
|
||||||
bool buildNativeAssets = true,
|
bool buildNativeAssets = true,
|
||||||
@visibleForTesting BuildSystem? buildSystem
|
@visibleForTesting BuildSystem? buildSystem,
|
||||||
|
required bool useImplicitPubspecResolution,
|
||||||
}) async {
|
}) async {
|
||||||
final Directory assetDirectory = fileSystem
|
final Directory assetDirectory = fileSystem
|
||||||
.directory(assetDirPath)
|
.directory(assetDirPath)
|
||||||
|
@ -63,6 +63,7 @@ void main() {
|
|||||||
target: 'main.dart',
|
target: 'main.dart',
|
||||||
analytics: fakeAnalytics,
|
analytics: fakeAnalytics,
|
||||||
devtoolsHandler: createNoOpHandler,
|
devtoolsHandler: createNoOpHandler,
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
}, overrides: <Type, Generator>{
|
}, overrides: <Type, Generator>{
|
||||||
Analytics: () => FakeAnalytics(),
|
Analytics: () => FakeAnalytics(),
|
||||||
@ -114,6 +115,7 @@ void main() {
|
|||||||
target: 'main.dart',
|
target: 'main.dart',
|
||||||
devtoolsHandler: createNoOpHandler,
|
devtoolsHandler: createNoOpHandler,
|
||||||
analytics: globals.analytics,
|
analytics: globals.analytics,
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
flutterDevice.generator = residentCompiler;
|
flutterDevice.generator = residentCompiler;
|
||||||
|
|
||||||
@ -138,6 +140,7 @@ void main() {
|
|||||||
target: 'main.dart',
|
target: 'main.dart',
|
||||||
devtoolsHandler: createNoOpHandler,
|
devtoolsHandler: createNoOpHandler,
|
||||||
analytics: globals.analytics,
|
analytics: globals.analytics,
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
flutterDevice.generator = residentCompiler;
|
flutterDevice.generator = residentCompiler;
|
||||||
|
|
||||||
@ -159,6 +162,7 @@ void main() {
|
|||||||
debuggingOptions: DebuggingOptions.enabled(BuildInfo.release),
|
debuggingOptions: DebuggingOptions.enabled(BuildInfo.release),
|
||||||
target: 'main.dart',
|
target: 'main.dart',
|
||||||
devtoolsHandler: createNoOpHandler,
|
devtoolsHandler: createNoOpHandler,
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
flutterDevice.runColdCode = 1;
|
flutterDevice.runColdCode = 1;
|
||||||
|
|
||||||
@ -180,6 +184,7 @@ void main() {
|
|||||||
debuggingOptions: DebuggingOptions.enabled(BuildInfo.release),
|
debuggingOptions: DebuggingOptions.enabled(BuildInfo.release),
|
||||||
target: 'main.dart',
|
target: 'main.dart',
|
||||||
devtoolsHandler: createNoOpHandler,
|
devtoolsHandler: createNoOpHandler,
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
flutterDevice.runColdError = Exception('BAD STUFF');
|
flutterDevice.runColdError = Exception('BAD STUFF');
|
||||||
|
|
||||||
@ -208,6 +213,7 @@ void main() {
|
|||||||
target: 'main.dart',
|
target: 'main.dart',
|
||||||
devtoolsHandler: createNoOpHandler,
|
devtoolsHandler: createNoOpHandler,
|
||||||
analytics: globals.analytics,
|
analytics: globals.analytics,
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
flutterDevice.generator = residentCompiler;
|
flutterDevice.generator = residentCompiler;
|
||||||
|
|
||||||
@ -268,6 +274,7 @@ void main() {
|
|||||||
target: 'main.dart',
|
target: 'main.dart',
|
||||||
devtoolsHandler: createNoOpHandler,
|
devtoolsHandler: createNoOpHandler,
|
||||||
analytics: globals.analytics,
|
analytics: globals.analytics,
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
final Completer<DebugConnectionInfo> futureConnectionInfo = Completer<DebugConnectionInfo>.sync();
|
final Completer<DebugConnectionInfo> futureConnectionInfo = Completer<DebugConnectionInfo>.sync();
|
||||||
final Completer<void> futureAppStart = Completer<void>.sync();
|
final Completer<void> futureAppStart = Completer<void>.sync();
|
||||||
@ -409,6 +416,7 @@ void main() {
|
|||||||
enableDevTools: false,
|
enableDevTools: false,
|
||||||
),
|
),
|
||||||
analytics: fakeAnalytics,
|
analytics: fakeAnalytics,
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
final Completer<DebugConnectionInfo> futureConnectionInfo = Completer<DebugConnectionInfo>.sync();
|
final Completer<DebugConnectionInfo> futureConnectionInfo = Completer<DebugConnectionInfo>.sync();
|
||||||
final Completer<void> futureAppStart = Completer<void>.sync();
|
final Completer<void> futureAppStart = Completer<void>.sync();
|
||||||
@ -473,6 +481,7 @@ void main() {
|
|||||||
target: 'main.dart',
|
target: 'main.dart',
|
||||||
devtoolsHandler: createNoOpHandler,
|
devtoolsHandler: createNoOpHandler,
|
||||||
analytics: fakeAnalytics,
|
analytics: fakeAnalytics,
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
final Completer<DebugConnectionInfo> futureConnectionInfo = Completer<DebugConnectionInfo>.sync();
|
final Completer<DebugConnectionInfo> futureConnectionInfo = Completer<DebugConnectionInfo>.sync();
|
||||||
final Completer<void> futureAppStart = Completer<void>.sync();
|
final Completer<void> futureAppStart = Completer<void>.sync();
|
||||||
@ -737,6 +746,7 @@ void main() {
|
|||||||
target: 'main.dart',
|
target: 'main.dart',
|
||||||
devtoolsHandler: createNoOpHandler,
|
devtoolsHandler: createNoOpHandler,
|
||||||
analytics: fakeAnalytics,
|
analytics: fakeAnalytics,
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
devFS.nextUpdateReport = UpdateFSReport(
|
devFS.nextUpdateReport = UpdateFSReport(
|
||||||
success: true,
|
success: true,
|
||||||
@ -1081,6 +1091,7 @@ void main() {
|
|||||||
target: 'main.dart',
|
target: 'main.dart',
|
||||||
devtoolsHandler: createNoOpHandler,
|
devtoolsHandler: createNoOpHandler,
|
||||||
analytics: fakeAnalytics,
|
analytics: fakeAnalytics,
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
expect(otherRunner.artifactDirectory.path, contains('foobar'));
|
expect(otherRunner.artifactDirectory.path, contains('foobar'));
|
||||||
}));
|
}));
|
||||||
@ -1194,6 +1205,7 @@ flutter:
|
|||||||
target: 'custom_main.dart',
|
target: 'custom_main.dart',
|
||||||
devtoolsHandler: createNoOpHandler,
|
devtoolsHandler: createNoOpHandler,
|
||||||
analytics: fakeAnalytics,
|
analytics: fakeAnalytics,
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
await residentRunner.runSourceGenerators();
|
await residentRunner.runSourceGenerators();
|
||||||
|
|
||||||
@ -1254,6 +1266,7 @@ flutter:
|
|||||||
target: 'main.dart',
|
target: 'main.dart',
|
||||||
devtoolsHandler: createNoOpHandler,
|
devtoolsHandler: createNoOpHandler,
|
||||||
analytics: fakeAnalytics,
|
analytics: fakeAnalytics,
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
flutterDevice.generator = residentCompiler;
|
flutterDevice.generator = residentCompiler;
|
||||||
|
|
||||||
@ -1354,6 +1367,7 @@ flutter:
|
|||||||
debuggingOptions: DebuggingOptions.disabled(BuildInfo.release),
|
debuggingOptions: DebuggingOptions.disabled(BuildInfo.release),
|
||||||
target: 'main.dart',
|
target: 'main.dart',
|
||||||
devtoolsHandler: createNoOpHandler,
|
devtoolsHandler: createNoOpHandler,
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
residentRunner.printHelp(details: true);
|
residentRunner.printHelp(details: true);
|
||||||
|
|
||||||
@ -1389,6 +1403,7 @@ flutter:
|
|||||||
debuggingOptions: DebuggingOptions.disabled(BuildInfo.release),
|
debuggingOptions: DebuggingOptions.disabled(BuildInfo.release),
|
||||||
target: 'main.dart',
|
target: 'main.dart',
|
||||||
devtoolsHandler: createNoOpHandler,
|
devtoolsHandler: createNoOpHandler,
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
residentRunner.printHelp(details: false);
|
residentRunner.printHelp(details: false);
|
||||||
|
|
||||||
@ -1478,6 +1493,7 @@ flutter:
|
|||||||
debuggingOptions: DebuggingOptions.enabled(BuildInfo.profile, vmserviceOutFile: 'foo', enableDevTools: false),
|
debuggingOptions: DebuggingOptions.enabled(BuildInfo.profile, vmserviceOutFile: 'foo', enableDevTools: false),
|
||||||
target: 'main.dart',
|
target: 'main.dart',
|
||||||
devtoolsHandler: createNoOpHandler,
|
devtoolsHandler: createNoOpHandler,
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
|
|
||||||
final Future<int?> result = residentRunner.attach();
|
final Future<int?> result = residentRunner.attach();
|
||||||
@ -1523,6 +1539,7 @@ flutter:
|
|||||||
target: 'main.dart',
|
target: 'main.dart',
|
||||||
devtoolsHandler: createNoOpHandler,
|
devtoolsHandler: createNoOpHandler,
|
||||||
analytics: fakeAnalytics,
|
analytics: fakeAnalytics,
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
|
|
||||||
await residentRunner.run();
|
await residentRunner.run();
|
||||||
@ -1553,6 +1570,7 @@ flutter:
|
|||||||
target: 'main.dart',
|
target: 'main.dart',
|
||||||
devtoolsHandler: createNoOpHandler,
|
devtoolsHandler: createNoOpHandler,
|
||||||
analytics: fakeAnalytics,
|
analytics: fakeAnalytics,
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
residentRunner.artifactDirectory.childFile('app.dill').writeAsStringSync('ABC');
|
residentRunner.artifactDirectory.childFile('app.dill').writeAsStringSync('ABC');
|
||||||
|
|
||||||
@ -1584,6 +1602,7 @@ flutter:
|
|||||||
target: 'main.dart',
|
target: 'main.dart',
|
||||||
devtoolsHandler: createNoOpHandler,
|
devtoolsHandler: createNoOpHandler,
|
||||||
analytics: fakeAnalytics,
|
analytics: fakeAnalytics,
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
residentRunner.artifactDirectory.childFile('app.dill').writeAsStringSync('ABC');
|
residentRunner.artifactDirectory.childFile('app.dill').writeAsStringSync('ABC');
|
||||||
|
|
||||||
@ -1616,6 +1635,7 @@ flutter:
|
|||||||
target: 'main.dart',
|
target: 'main.dart',
|
||||||
devtoolsHandler: createNoOpHandler,
|
devtoolsHandler: createNoOpHandler,
|
||||||
analytics: fakeAnalytics,
|
analytics: fakeAnalytics,
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
residentRunner.artifactDirectory.childFile('app.dill').writeAsStringSync('ABC');
|
residentRunner.artifactDirectory.childFile('app.dill').writeAsStringSync('ABC');
|
||||||
|
|
||||||
@ -1640,6 +1660,7 @@ flutter:
|
|||||||
target: 'main.dart',
|
target: 'main.dart',
|
||||||
devtoolsHandler: createNoOpHandler,
|
devtoolsHandler: createNoOpHandler,
|
||||||
analytics: fakeAnalytics,
|
analytics: fakeAnalytics,
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
residentRunner.artifactDirectory.childFile('app.dill').writeAsStringSync('ABC');
|
residentRunner.artifactDirectory.childFile('app.dill').writeAsStringSync('ABC');
|
||||||
|
|
||||||
@ -1665,6 +1686,7 @@ flutter:
|
|||||||
target: 'main.dart',
|
target: 'main.dart',
|
||||||
devtoolsHandler: createNoOpHandler,
|
devtoolsHandler: createNoOpHandler,
|
||||||
analytics: fakeAnalytics,
|
analytics: fakeAnalytics,
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
residentRunner.artifactDirectory.childFile('app.dill').writeAsStringSync('ABC');
|
residentRunner.artifactDirectory.childFile('app.dill').writeAsStringSync('ABC');
|
||||||
|
|
||||||
@ -1694,6 +1716,7 @@ flutter:
|
|||||||
target: 'main.dart',
|
target: 'main.dart',
|
||||||
devtoolsHandler: createNoOpHandler,
|
devtoolsHandler: createNoOpHandler,
|
||||||
analytics: fakeAnalytics,
|
analytics: fakeAnalytics,
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
residentRunner.artifactDirectory.childFile('app.dill').writeAsStringSync('ABC');
|
residentRunner.artifactDirectory.childFile('app.dill').writeAsStringSync('ABC');
|
||||||
|
|
||||||
@ -1717,6 +1740,7 @@ flutter:
|
|||||||
target: 'main.dart',
|
target: 'main.dart',
|
||||||
devtoolsHandler: createNoOpHandler,
|
devtoolsHandler: createNoOpHandler,
|
||||||
analytics: fakeAnalytics,
|
analytics: fakeAnalytics,
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
|
|
||||||
await residentRunner.run();
|
await residentRunner.run();
|
||||||
@ -1738,6 +1762,7 @@ flutter:
|
|||||||
target: 'main.dart',
|
target: 'main.dart',
|
||||||
devtoolsHandler: createNoOpHandler,
|
devtoolsHandler: createNoOpHandler,
|
||||||
analytics: fakeAnalytics,
|
analytics: fakeAnalytics,
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
|
|
||||||
await residentRunner.run();
|
await residentRunner.run();
|
||||||
@ -1761,6 +1786,7 @@ flutter:
|
|||||||
debuggingOptions: DebuggingOptions.enabled(BuildInfo.profile, vmserviceOutFile: 'foo'),
|
debuggingOptions: DebuggingOptions.enabled(BuildInfo.profile, vmserviceOutFile: 'foo'),
|
||||||
devtoolsHandler: createNoOpHandler,
|
devtoolsHandler: createNoOpHandler,
|
||||||
target: 'main.dart',
|
target: 'main.dart',
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
|
|
||||||
await residentRunner.run();
|
await residentRunner.run();
|
||||||
@ -2142,6 +2168,7 @@ flutter:
|
|||||||
target: 'main.dart',
|
target: 'main.dart',
|
||||||
devtoolsHandler: createNoOpHandler,
|
devtoolsHandler: createNoOpHandler,
|
||||||
analytics: fakeAnalytics,
|
analytics: fakeAnalytics,
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
await residentRunner.cleanupAtFinish();
|
await residentRunner.cleanupAtFinish();
|
||||||
|
|
||||||
@ -2163,6 +2190,7 @@ flutter:
|
|||||||
target: 'main.dart',
|
target: 'main.dart',
|
||||||
devtoolsHandler: createNoOpHandler,
|
devtoolsHandler: createNoOpHandler,
|
||||||
analytics: fakeAnalytics,
|
analytics: fakeAnalytics,
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
|
|
||||||
(flutterDevice.devFS! as FakeDevFS).assetPathsToEvict = <String>{'asset'};
|
(flutterDevice.devFS! as FakeDevFS).assetPathsToEvict = <String>{'asset'};
|
||||||
@ -2188,6 +2216,7 @@ flutter:
|
|||||||
target: 'main.dart',
|
target: 'main.dart',
|
||||||
devtoolsHandler: createNoOpHandler,
|
devtoolsHandler: createNoOpHandler,
|
||||||
analytics: fakeAnalytics,
|
analytics: fakeAnalytics,
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
|
|
||||||
(flutterDevice.devFS! as FakeDevFS).shaderPathsToEvict = <String>{'foo.frag'};
|
(flutterDevice.devFS! as FakeDevFS).shaderPathsToEvict = <String>{'foo.frag'};
|
||||||
@ -2210,6 +2239,7 @@ flutter:
|
|||||||
target: 'main.dart',
|
target: 'main.dart',
|
||||||
devtoolsHandler: createNoOpHandler,
|
devtoolsHandler: createNoOpHandler,
|
||||||
analytics: fakeAnalytics,
|
analytics: fakeAnalytics,
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
|
|
||||||
expect(flutterDevice.devFS!.hasSetAssetDirectory, false);
|
expect(flutterDevice.devFS!.hasSetAssetDirectory, false);
|
||||||
@ -2232,6 +2262,7 @@ flutter:
|
|||||||
target: 'main.dart',
|
target: 'main.dart',
|
||||||
devtoolsHandler: createNoOpHandler,
|
devtoolsHandler: createNoOpHandler,
|
||||||
analytics: fakeAnalytics,
|
analytics: fakeAnalytics,
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
|
|
||||||
(flutterDevice.devFS! as FakeDevFS).assetPathsToEvict = <String>{'asset'};
|
(flutterDevice.devFS! as FakeDevFS).assetPathsToEvict = <String>{'asset'};
|
||||||
@ -2281,6 +2312,7 @@ flutter:
|
|||||||
devtoolsHandler: createNoOpHandler,
|
devtoolsHandler: createNoOpHandler,
|
||||||
analytics: globals.analytics,
|
analytics: globals.analytics,
|
||||||
nativeAssetsYamlFile: 'foo.yaml',
|
nativeAssetsYamlFile: 'foo.yaml',
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
|
|
||||||
final int? result = await residentRunner.run();
|
final int? result = await residentRunner.run();
|
||||||
|
@ -61,6 +61,7 @@ void main() {
|
|||||||
fs: fileSystem,
|
fs: fileSystem,
|
||||||
fakeFlutterVersion: FakeFlutterVersion(),
|
fakeFlutterVersion: FakeFlutterVersion(),
|
||||||
),
|
),
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
|
|
||||||
final Completer<DebugConnectionInfo> connectionInfoCompleter = Completer<DebugConnectionInfo>();
|
final Completer<DebugConnectionInfo> connectionInfoCompleter = Completer<DebugConnectionInfo>();
|
||||||
@ -91,6 +92,7 @@ void main() {
|
|||||||
fs: fileSystem,
|
fs: fileSystem,
|
||||||
fakeFlutterVersion: FakeFlutterVersion(),
|
fakeFlutterVersion: FakeFlutterVersion(),
|
||||||
),
|
),
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
|
|
||||||
expect(() => residentWebRunner.run(), throwsToolExit());
|
expect(() => residentWebRunner.run(), throwsToolExit());
|
||||||
@ -116,6 +118,7 @@ void main() {
|
|||||||
fs: fileSystem,
|
fs: fileSystem,
|
||||||
fakeFlutterVersion: FakeFlutterVersion(),
|
fakeFlutterVersion: FakeFlutterVersion(),
|
||||||
),
|
),
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
|
|
||||||
expect(() async => residentWebRunner.run(), throwsException);
|
expect(() async => residentWebRunner.run(), throwsException);
|
||||||
@ -140,6 +143,7 @@ void main() {
|
|||||||
fs: fileSystem,
|
fs: fileSystem,
|
||||||
fakeFlutterVersion: FakeFlutterVersion(),
|
fakeFlutterVersion: FakeFlutterVersion(),
|
||||||
),
|
),
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
final Completer<DebugConnectionInfo> connectionInfoCompleter = Completer<DebugConnectionInfo>();
|
final Completer<DebugConnectionInfo> connectionInfoCompleter = Completer<DebugConnectionInfo>();
|
||||||
unawaited(residentWebRunner.run(
|
unawaited(residentWebRunner.run(
|
||||||
@ -169,6 +173,7 @@ void main() {
|
|||||||
fs: fileSystem,
|
fs: fileSystem,
|
||||||
fakeFlutterVersion: FakeFlutterVersion(),
|
fakeFlutterVersion: FakeFlutterVersion(),
|
||||||
),
|
),
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
final Completer<DebugConnectionInfo> connectionInfoCompleter = Completer<DebugConnectionInfo>();
|
final Completer<DebugConnectionInfo> connectionInfoCompleter = Completer<DebugConnectionInfo>();
|
||||||
unawaited(residentWebRunner.run(
|
unawaited(residentWebRunner.run(
|
||||||
|
@ -170,6 +170,7 @@ void main() {
|
|||||||
usage: globals.flutterUsage,
|
usage: globals.flutterUsage,
|
||||||
analytics: globals.analytics,
|
analytics: globals.analytics,
|
||||||
systemClock: globals.systemClock,
|
systemClock: globals.systemClock,
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
|
|
||||||
expect(profileResidentWebRunner.debuggingEnabled, false);
|
expect(profileResidentWebRunner.debuggingEnabled, false);
|
||||||
@ -202,6 +203,7 @@ void main() {
|
|||||||
usage: globals.flutterUsage,
|
usage: globals.flutterUsage,
|
||||||
analytics: globals.analytics,
|
analytics: globals.analytics,
|
||||||
systemClock: globals.systemClock,
|
systemClock: globals.systemClock,
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
|
|
||||||
expect(profileResidentWebRunner.uri, webDevFS.baseUri);
|
expect(profileResidentWebRunner.uri, webDevFS.baseUri);
|
||||||
@ -221,6 +223,7 @@ void main() {
|
|||||||
usage: globals.flutterUsage,
|
usage: globals.flutterUsage,
|
||||||
analytics: globals.analytics,
|
analytics: globals.analytics,
|
||||||
systemClock: globals.systemClock,
|
systemClock: globals.systemClock,
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
fakeVmServiceHost = FakeVmServiceHost(requests: <VmServiceExpectation>[]);
|
fakeVmServiceHost = FakeVmServiceHost(requests: <VmServiceExpectation>[]);
|
||||||
flutterDevice.device = chromeDevice;
|
flutterDevice.device = chromeDevice;
|
||||||
@ -234,6 +237,7 @@ void main() {
|
|||||||
usage: globals.flutterUsage,
|
usage: globals.flutterUsage,
|
||||||
analytics: globals.analytics,
|
analytics: globals.analytics,
|
||||||
systemClock: globals.systemClock,
|
systemClock: globals.systemClock,
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
|
|
||||||
expect(profileResidentWebRunner.supportsServiceProtocol, false);
|
expect(profileResidentWebRunner.supportsServiceProtocol, false);
|
||||||
@ -368,6 +372,7 @@ void main() {
|
|||||||
analytics: globals.analytics,
|
analytics: globals.analytics,
|
||||||
systemClock: globals.systemClock,
|
systemClock: globals.systemClock,
|
||||||
devtoolsHandler: createNoOpHandler,
|
devtoolsHandler: createNoOpHandler,
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
|
|
||||||
expect(await residentWebRunner.run(), 0);
|
expect(await residentWebRunner.run(), 0);
|
||||||
@ -395,6 +400,7 @@ void main() {
|
|||||||
analytics: globals.analytics,
|
analytics: globals.analytics,
|
||||||
systemClock: globals.systemClock,
|
systemClock: globals.systemClock,
|
||||||
devtoolsHandler: createNoOpHandler,
|
devtoolsHandler: createNoOpHandler,
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
|
|
||||||
expect(await residentWebRunner.run(), 0);
|
expect(await residentWebRunner.run(), 0);
|
||||||
@ -596,6 +602,7 @@ void main() {
|
|||||||
analytics: globals.analytics,
|
analytics: globals.analytics,
|
||||||
systemClock: globals.systemClock,
|
systemClock: globals.systemClock,
|
||||||
devtoolsHandler: createNoOpHandler,
|
devtoolsHandler: createNoOpHandler,
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
fakeVmServiceHost =
|
fakeVmServiceHost =
|
||||||
FakeVmServiceHost(requests: kAttachExpectations.toList());
|
FakeVmServiceHost(requests: kAttachExpectations.toList());
|
||||||
@ -1120,6 +1127,7 @@ void main() {
|
|||||||
analytics: globals.analytics,
|
analytics: globals.analytics,
|
||||||
systemClock: globals.systemClock,
|
systemClock: globals.systemClock,
|
||||||
devtoolsHandler: createNoOpHandler,
|
devtoolsHandler: createNoOpHandler,
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
|
|
||||||
final Completer<DebugConnectionInfo> connectionInfoCompleter =
|
final Completer<DebugConnectionInfo> connectionInfoCompleter =
|
||||||
@ -1169,6 +1177,7 @@ void main() {
|
|||||||
analytics: globals.analytics,
|
analytics: globals.analytics,
|
||||||
systemClock: globals.systemClock,
|
systemClock: globals.systemClock,
|
||||||
devtoolsHandler: createNoOpHandler,
|
devtoolsHandler: createNoOpHandler,
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
|
|
||||||
final Completer<DebugConnectionInfo> connectionInfoCompleter =
|
final Completer<DebugConnectionInfo> connectionInfoCompleter =
|
||||||
@ -1212,6 +1221,7 @@ void main() {
|
|||||||
analytics: globals.analytics,
|
analytics: globals.analytics,
|
||||||
systemClock: globals.systemClock,
|
systemClock: globals.systemClock,
|
||||||
devtoolsHandler: createNoOpHandler,
|
devtoolsHandler: createNoOpHandler,
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
|
|
||||||
// Create necessary files.
|
// Create necessary files.
|
||||||
@ -1468,6 +1478,7 @@ ResidentRunner setUpResidentRunner(
|
|||||||
fileSystem: globals.fs,
|
fileSystem: globals.fs,
|
||||||
logger: logger ?? BufferLogger.test(),
|
logger: logger ?? BufferLogger.test(),
|
||||||
devtoolsHandler: createNoOpHandler,
|
devtoolsHandler: createNoOpHandler,
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -98,6 +98,7 @@ void main() {
|
|||||||
artifacts: Artifacts.test(),
|
artifacts: Artifacts.test(),
|
||||||
logger: BufferLogger.test(),
|
logger: BufferLogger.test(),
|
||||||
flutterVersion: FakeFlutterVersion(),
|
flutterVersion: FakeFlutterVersion(),
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
logLines = <String>[];
|
logLines = <String>[];
|
||||||
device.getLogReader().logLines.listen(logLines.add);
|
device.getLogReader().logLines.listen(logLines.add);
|
||||||
@ -217,6 +218,7 @@ FlutterTesterDevices setUpFlutterTesterDevices() {
|
|||||||
processManager: FakeProcessManager.any(),
|
processManager: FakeProcessManager.any(),
|
||||||
fileSystem: MemoryFileSystem.test(),
|
fileSystem: MemoryFileSystem.test(),
|
||||||
flutterVersion: FakeFlutterVersion(),
|
flutterVersion: FakeFlutterVersion(),
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -70,6 +70,7 @@ void main() {
|
|||||||
flutterVersion: flutterVersion,
|
flutterVersion: flutterVersion,
|
||||||
fileSystem: fileSystem,
|
fileSystem: fileSystem,
|
||||||
analytics: fakeAnalytics,
|
analytics: fakeAnalytics,
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
await webBuilder.buildWeb(
|
await webBuilder.buildWeb(
|
||||||
flutterProject,
|
flutterProject,
|
||||||
@ -160,6 +161,7 @@ void main() {
|
|||||||
flutterVersion: flutterVersion,
|
flutterVersion: flutterVersion,
|
||||||
fileSystem: fileSystem,
|
fileSystem: fileSystem,
|
||||||
analytics: fakeAnalytics,
|
analytics: fakeAnalytics,
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
await expectLater(
|
await expectLater(
|
||||||
() async => webBuilder.buildWeb(
|
() async => webBuilder.buildWeb(
|
||||||
|
@ -183,7 +183,7 @@ void testUsingContext(
|
|||||||
// can provide the AlwaysFalseBotDetector in the overrides, or its own
|
// can provide the AlwaysFalseBotDetector in the overrides, or its own
|
||||||
// BotDetector implementation in the overrides.
|
// BotDetector implementation in the overrides.
|
||||||
BotDetector: overrides[BotDetector] ?? () => const FakeBotDetector(true),
|
BotDetector: overrides[BotDetector] ?? () => const FakeBotDetector(true),
|
||||||
});
|
}, useImplicitPubspecResolution: true);
|
||||||
}, testOn: testOn, skip: skip);
|
}, testOn: testOn, skip: skip);
|
||||||
// We don't support "timeout"; see ../../dart_test.yaml which
|
// We don't support "timeout"; see ../../dart_test.yaml which
|
||||||
// configures all tests to have a 15 minute timeout which should
|
// configures all tests to have a 15 minute timeout which should
|
||||||
|
@ -92,7 +92,7 @@ class Testbed {
|
|||||||
///
|
///
|
||||||
/// `overrides` may be used to provide new context values for the single test
|
/// `overrides` may be used to provide new context values for the single test
|
||||||
/// case or override any context values from the setup.
|
/// case or override any context values from the setup.
|
||||||
Future<T?> run<T>(FutureOr<T> Function() test, {Map<Type, Generator>? overrides}) {
|
Future<T?> run<T>(FutureOr<T> Function() test, {Map<Type, Generator>? overrides, bool useImplicitPubspecResolution = true}) {
|
||||||
final Map<Type, Generator> testOverrides = <Type, Generator>{
|
final Map<Type, Generator> testOverrides = <Type, Generator>{
|
||||||
..._testbedDefaults,
|
..._testbedDefaults,
|
||||||
// Add the initial setUp overrides
|
// Add the initial setUp overrides
|
||||||
@ -139,7 +139,7 @@ class Testbed {
|
|||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
});
|
});
|
||||||
});
|
}, useImplicitPubspecResolution: useImplicitPubspecResolution);
|
||||||
}, createHttpClient: (SecurityContext? c) => FakeHttpClient.any());
|
}, createHttpClient: (SecurityContext? c) => FakeHttpClient.any());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -21,6 +21,7 @@ void main() {
|
|||||||
processManager: FakeProcessManager.empty(),
|
processManager: FakeProcessManager.empty(),
|
||||||
),
|
),
|
||||||
dartSdkPath: 'dart',
|
dartSdkPath: 'dart',
|
||||||
|
useImplicitPubspecResolution: true,
|
||||||
);
|
);
|
||||||
const String link = 'https://flutter.dev/to/integration-test-on-web';
|
const String link = 'https://flutter.dev/to/integration-test-on-web';
|
||||||
try {
|
try {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user