mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
[flutter_tools] surface null safety/experiment flags in attach (#60317)
Missed this one. Needed for google3 and add2app workflows
This commit is contained in:
parent
47c5174bef
commit
4bb6096086
@ -63,6 +63,8 @@ class AttachCommand extends FlutterCommand {
|
||||
usesFuchsiaOptions(hide: !verboseHelp);
|
||||
usesDartDefineOption();
|
||||
usesDeviceUserOption();
|
||||
addEnableExperimentation(hide: !verboseHelp);
|
||||
addNullSafetyModeOptions(hide: !verboseHelp);
|
||||
argParser
|
||||
..addOption(
|
||||
'debug-port',
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
// found in the LICENSE file.
|
||||
|
||||
import 'package:args/args.dart';
|
||||
import 'package:flutter_tools/src/commands/build.dart';
|
||||
import 'package:flutter_tools/src/commands/attach.dart';
|
||||
import 'package:flutter_tools/src/commands/build_aar.dart';
|
||||
import 'package:flutter_tools/src/commands/build_apk.dart';
|
||||
import 'package:flutter_tools/src/commands/build_appbundle.dart';
|
||||
@ -15,13 +15,14 @@ import 'package:flutter_tools/src/commands/build_macos.dart';
|
||||
import 'package:flutter_tools/src/commands/build_web.dart';
|
||||
import 'package:flutter_tools/src/commands/build_windows.dart';
|
||||
import 'package:flutter_tools/src/globals.dart' as globals;
|
||||
import 'package:flutter_tools/src/runner/flutter_command.dart';
|
||||
|
||||
import '../../src/common.dart';
|
||||
import '../../src/context.dart';
|
||||
|
||||
void main() {
|
||||
testUsingContext('All build commands support null safety options', () {
|
||||
final List<BuildSubCommand> commands = <BuildSubCommand>[
|
||||
final List<FlutterCommand> commands = <FlutterCommand>[
|
||||
BuildWindowsCommand(verboseHelp: false),
|
||||
BuildLinuxCommand(verboseHelp: false),
|
||||
BuildMacosCommand(verboseHelp: false),
|
||||
@ -32,9 +33,10 @@ void main() {
|
||||
BuildFuchsiaCommand(verboseHelp: false),
|
||||
BuildAarCommand(verboseHelp: false),
|
||||
BuildIOSFrameworkCommand(verboseHelp: false, buildSystem: globals.buildSystem),
|
||||
AttachCommand(verboseHelp: false),
|
||||
];
|
||||
|
||||
for (final BuildSubCommand command in commands) {
|
||||
for (final FlutterCommand command in commands) {
|
||||
final ArgResults results = command.argParser.parse(<String>[
|
||||
'--sound-null-safety',
|
||||
'--enable-experiment=non-nullable',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user