Unverified Commit 4bb60960 authored by Jonah Williams's avatar Jonah Williams Committed by GitHub

[flutter_tools] surface null safety/experiment flags in attach (#60317)

Missed this one. Needed for google3 and add2app workflows
parent 47c5174b
...@@ -63,6 +63,8 @@ class AttachCommand extends FlutterCommand { ...@@ -63,6 +63,8 @@ class AttachCommand extends FlutterCommand {
usesFuchsiaOptions(hide: !verboseHelp); usesFuchsiaOptions(hide: !verboseHelp);
usesDartDefineOption(); usesDartDefineOption();
usesDeviceUserOption(); usesDeviceUserOption();
addEnableExperimentation(hide: !verboseHelp);
addNullSafetyModeOptions(hide: !verboseHelp);
argParser argParser
..addOption( ..addOption(
'debug-port', 'debug-port',
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
// found in the LICENSE file. // found in the LICENSE file.
import 'package:args/args.dart'; 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_aar.dart';
import 'package:flutter_tools/src/commands/build_apk.dart'; import 'package:flutter_tools/src/commands/build_apk.dart';
import 'package:flutter_tools/src/commands/build_appbundle.dart'; import 'package:flutter_tools/src/commands/build_appbundle.dart';
...@@ -15,13 +15,14 @@ import 'package:flutter_tools/src/commands/build_macos.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_web.dart';
import 'package:flutter_tools/src/commands/build_windows.dart'; import 'package:flutter_tools/src/commands/build_windows.dart';
import 'package:flutter_tools/src/globals.dart' as globals; import 'package:flutter_tools/src/globals.dart' as globals;
import 'package:flutter_tools/src/runner/flutter_command.dart';
import '../../src/common.dart'; import '../../src/common.dart';
import '../../src/context.dart'; import '../../src/context.dart';
void main() { void main() {
testUsingContext('All build commands support null safety options', () { testUsingContext('All build commands support null safety options', () {
final List<BuildSubCommand> commands = <BuildSubCommand>[ final List<FlutterCommand> commands = <FlutterCommand>[
BuildWindowsCommand(verboseHelp: false), BuildWindowsCommand(verboseHelp: false),
BuildLinuxCommand(verboseHelp: false), BuildLinuxCommand(verboseHelp: false),
BuildMacosCommand(verboseHelp: false), BuildMacosCommand(verboseHelp: false),
...@@ -32,9 +33,10 @@ void main() { ...@@ -32,9 +33,10 @@ void main() {
BuildFuchsiaCommand(verboseHelp: false), BuildFuchsiaCommand(verboseHelp: false),
BuildAarCommand(verboseHelp: false), BuildAarCommand(verboseHelp: false),
BuildIOSFrameworkCommand(verboseHelp: false, buildSystem: globals.buildSystem), 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>[ final ArgResults results = command.argParser.parse(<String>[
'--sound-null-safety', '--sound-null-safety',
'--enable-experiment=non-nullable', '--enable-experiment=non-nullable',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment