Unverified Commit 42ca92c7 authored by Alexander Aprelev's avatar Alexander Aprelev Committed by GitHub

Hide preview-dart-2 flag. Show only in verbose (#13270)

parent f7b2d6e7
...@@ -17,9 +17,9 @@ import 'build_ios.dart'; ...@@ -17,9 +17,9 @@ import 'build_ios.dart';
class BuildCommand extends FlutterCommand { class BuildCommand extends FlutterCommand {
BuildCommand({bool verboseHelp: false}) { BuildCommand({bool verboseHelp: false}) {
addSubcommand(new BuildApkCommand()); addSubcommand(new BuildApkCommand(verboseHelp: verboseHelp));
addSubcommand(new BuildAotCommand()); addSubcommand(new BuildAotCommand(verboseHelp: verboseHelp));
addSubcommand(new BuildIOSCommand()); addSubcommand(new BuildIOSCommand(verboseHelp: verboseHelp));
addSubcommand(new BuildFlxCommand(verboseHelp: verboseHelp)); addSubcommand(new BuildFlxCommand(verboseHelp: verboseHelp));
} }
......
...@@ -27,7 +27,7 @@ const List<String> kAotSnapshotFiles = const <String>[ ...@@ -27,7 +27,7 @@ const List<String> kAotSnapshotFiles = const <String>[
]; ];
class BuildAotCommand extends BuildSubCommand { class BuildAotCommand extends BuildSubCommand {
BuildAotCommand() { BuildAotCommand({bool verboseHelp: false}) {
usesTargetOption(); usesTargetOption();
addBuildModeFlags(); addBuildModeFlags();
usesPubOption(); usesPubOption();
...@@ -39,7 +39,7 @@ class BuildAotCommand extends BuildSubCommand { ...@@ -39,7 +39,7 @@ class BuildAotCommand extends BuildSubCommand {
) )
..addFlag('interpreter') ..addFlag('interpreter')
..addFlag('quiet', defaultsTo: false) ..addFlag('quiet', defaultsTo: false)
..addFlag('preview-dart-2', negatable: false) ..addFlag('preview-dart-2', negatable: false, hide: !verboseHelp)
..addOption(FlutterOptions.kExtraFrontEndOptions, ..addOption(FlutterOptions.kExtraFrontEndOptions,
allowMultiple: true, allowMultiple: true,
splitCommas: true, splitCommas: true,
......
...@@ -8,14 +8,14 @@ import '../android/apk.dart'; ...@@ -8,14 +8,14 @@ import '../android/apk.dart';
import 'build.dart'; import 'build.dart';
class BuildApkCommand extends BuildSubCommand { class BuildApkCommand extends BuildSubCommand {
BuildApkCommand() { BuildApkCommand({bool verboseHelp: false}) {
usesTargetOption(); usesTargetOption();
addBuildModeFlags(); addBuildModeFlags();
usesFlavorOption(); usesFlavorOption();
usesPubOption(); usesPubOption();
argParser argParser
..addFlag('preview-dart-2', negatable: false) ..addFlag('preview-dart-2', negatable: false, hide: !verboseHelp)
..addFlag('prefer-shared-library', negatable: false, ..addFlag('prefer-shared-library', negatable: false,
help: 'Whether to prefer compiling to a *.so file (android only).'); help: 'Whether to prefer compiling to a *.so file (android only).');
} }
......
...@@ -20,7 +20,7 @@ class BuildFlxCommand extends BuildSubCommand { ...@@ -20,7 +20,7 @@ class BuildFlxCommand extends BuildSubCommand {
argParser.addOption('output-file', abbr: 'o', defaultsTo: defaultFlxOutputPath); argParser.addOption('output-file', abbr: 'o', defaultsTo: defaultFlxOutputPath);
argParser.addOption('snapshot', defaultsTo: defaultSnapshotPath); argParser.addOption('snapshot', defaultsTo: defaultSnapshotPath);
argParser.addOption('depfile', defaultsTo: defaultDepfilePath); argParser.addOption('depfile', defaultsTo: defaultDepfilePath);
argParser.addFlag('preview-dart-2', negatable: false); argParser.addFlag('preview-dart-2', negatable: false, hide: !verboseHelp);
argParser.addOption('working-dir', defaultsTo: getAssetBuildDirectory()); argParser.addOption('working-dir', defaultsTo: getAssetBuildDirectory());
argParser.addFlag('report-licensed-packages', help: 'Whether to report the names of all the packages that are included in the application\'s LICENSE file.', defaultsTo: false); argParser.addFlag('report-licensed-packages', help: 'Whether to report the names of all the packages that are included in the application\'s LICENSE file.', defaultsTo: false);
usesPubOption(); usesPubOption();
......
...@@ -13,7 +13,7 @@ import '../ios/mac.dart'; ...@@ -13,7 +13,7 @@ import '../ios/mac.dart';
import 'build.dart'; import 'build.dart';
class BuildIOSCommand extends BuildSubCommand { class BuildIOSCommand extends BuildSubCommand {
BuildIOSCommand() { BuildIOSCommand({bool verboseHelp: false}) {
usesTargetOption(); usesTargetOption();
usesFlavorOption(); usesFlavorOption();
usesPubOption(); usesPubOption();
...@@ -29,7 +29,8 @@ class BuildIOSCommand extends BuildSubCommand { ...@@ -29,7 +29,8 @@ class BuildIOSCommand extends BuildSubCommand {
argParser.addFlag('simulator', help: 'Build for the iOS simulator instead of the device.'); argParser.addFlag('simulator', help: 'Build for the iOS simulator instead of the device.');
argParser.addFlag('codesign', negatable: true, defaultsTo: true, argParser.addFlag('codesign', negatable: true, defaultsTo: true,
help: 'Codesign the application bundle (only available on device builds).'); help: 'Codesign the application bundle (only available on device builds).');
argParser.addFlag('preview-dart-2', negatable: false); argParser.addFlag('preview-dart-2', negatable: false,
hide: !verboseHelp);
} }
@override @override
......
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