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';
class BuildCommand extends FlutterCommand {
BuildCommand({bool verboseHelp: false}) {
addSubcommand(new BuildApkCommand());
addSubcommand(new BuildAotCommand());
addSubcommand(new BuildIOSCommand());
addSubcommand(new BuildApkCommand(verboseHelp: verboseHelp));
addSubcommand(new BuildAotCommand(verboseHelp: verboseHelp));
addSubcommand(new BuildIOSCommand(verboseHelp: verboseHelp));
addSubcommand(new BuildFlxCommand(verboseHelp: verboseHelp));
}
......
......@@ -27,7 +27,7 @@ const List<String> kAotSnapshotFiles = const <String>[
];
class BuildAotCommand extends BuildSubCommand {
BuildAotCommand() {
BuildAotCommand({bool verboseHelp: false}) {
usesTargetOption();
addBuildModeFlags();
usesPubOption();
......@@ -39,7 +39,7 @@ class BuildAotCommand extends BuildSubCommand {
)
..addFlag('interpreter')
..addFlag('quiet', defaultsTo: false)
..addFlag('preview-dart-2', negatable: false)
..addFlag('preview-dart-2', negatable: false, hide: !verboseHelp)
..addOption(FlutterOptions.kExtraFrontEndOptions,
allowMultiple: true,
splitCommas: true,
......
......@@ -8,14 +8,14 @@ import '../android/apk.dart';
import 'build.dart';
class BuildApkCommand extends BuildSubCommand {
BuildApkCommand() {
BuildApkCommand({bool verboseHelp: false}) {
usesTargetOption();
addBuildModeFlags();
usesFlavorOption();
usesPubOption();
argParser
..addFlag('preview-dart-2', negatable: false)
..addFlag('preview-dart-2', negatable: false, hide: !verboseHelp)
..addFlag('prefer-shared-library', negatable: false,
help: 'Whether to prefer compiling to a *.so file (android only).');
}
......
......@@ -20,7 +20,7 @@ class BuildFlxCommand extends BuildSubCommand {
argParser.addOption('output-file', abbr: 'o', defaultsTo: defaultFlxOutputPath);
argParser.addOption('snapshot', defaultsTo: defaultSnapshotPath);
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.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();
......
......@@ -13,7 +13,7 @@ import '../ios/mac.dart';
import 'build.dart';
class BuildIOSCommand extends BuildSubCommand {
BuildIOSCommand() {
BuildIOSCommand({bool verboseHelp: false}) {
usesTargetOption();
usesFlavorOption();
usesPubOption();
......@@ -29,7 +29,8 @@ class BuildIOSCommand extends BuildSubCommand {
argParser.addFlag('simulator', help: 'Build for the iOS simulator instead of the device.');
argParser.addFlag('codesign', negatable: true, defaultsTo: true,
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
......
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