Unverified Commit ffc56ff7 authored by Jonah Williams's avatar Jonah Williams Committed by GitHub

[flutter_tools] hide all development tools (#57690)

parent 43f18f36
......@@ -89,8 +89,6 @@ Future<void> main(List<String> args) async {
EmulatorsCommand(),
FormatCommand(),
GenerateCommand(),
IdeConfigCommand(hidden: !verboseHelp),
InjectPluginsCommand(hidden: !verboseHelp),
InstallCommand(),
LogsCommand(),
MakeHostAppEditableCommand(),
......@@ -100,14 +98,17 @@ Future<void> main(List<String> args) async {
ScreenshotCommand(),
ShellCompletionCommand(),
TestCommand(verboseHelp: verboseHelp),
TrainingCommand(),
UpdatePackagesCommand(hidden: !verboseHelp),
UpgradeCommand(),
VersionCommand(),
SymbolizeCommand(
stdio: globals.stdio,
fileSystem: globals.fs,
),
// Development-only commands. These are always hidden,
IdeConfigCommand(),
InjectPluginsCommand(),
TrainingCommand(),
UpdatePackagesCommand(),
], verbose: verbose,
muteCommandLogging: muteCommandLogging,
verboseHelp: verboseHelp,
......
......@@ -12,7 +12,7 @@ import '../runner/flutter_command.dart';
import '../template.dart';
class IdeConfigCommand extends FlutterCommand {
IdeConfigCommand({this.hidden = false}) {
IdeConfigCommand() {
argParser.addFlag(
'overwrite',
negatable: true,
......@@ -57,7 +57,7 @@ class IdeConfigCommand extends FlutterCommand {
'Currently, IntelliJ is the default (and only) IDE that may be configured.';
@override
final bool hidden;
final bool hidden = true;
@override
String get invocation => '${runner.executableName} $name';
......
......@@ -10,7 +10,7 @@ import '../project.dart';
import '../runner/flutter_command.dart';
class InjectPluginsCommand extends FlutterCommand {
InjectPluginsCommand({ this.hidden = false }) {
InjectPluginsCommand() {
requiresPubspecYaml();
}
......@@ -21,7 +21,7 @@ class InjectPluginsCommand extends FlutterCommand {
final String description = 'Re-generates the GeneratedPluginRegistrants.';
@override
final bool hidden;
final bool hidden = true;
@override
Future<Set<DevelopmentArtifact>> get requiredArtifacts async => const <DevelopmentArtifact>{};
......
......@@ -33,7 +33,7 @@ const Map<String, String> _kManuallyPinnedDependencies = <String, String>{
};
class UpdatePackagesCommand extends FlutterCommand {
UpdatePackagesCommand({ this.hidden = false }) {
UpdatePackagesCommand() {
argParser
..addFlag(
'force-upgrade',
......@@ -98,7 +98,7 @@ class UpdatePackagesCommand extends FlutterCommand {
final List<String> aliases = <String>['upgrade-packages'];
@override
final bool hidden;
final bool hidden = true;
// Lazy-initialize the net utilities with values from the context.
......
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'package:flutter_tools/src/base/io.dart';
import 'package:flutter_tools/src/globals.dart' as globals;
import 'package:process/process.dart';
import '../src/common.dart';
void main() {
test('All development tools are hidden', () async {
final String flutterBin = globals.fs.path.join(getFlutterRoot(), 'bin', 'flutter');
final ProcessResult result = await const LocalProcessManager().run(<String>[
flutterBin,
'-h',
'-v',
]);
expect(result.stdout, isNot(contains('ide-config')));
expect(result.stdout, isNot(contains('update-packages')));
expect(result.stdout, isNot(contains('inject-plugins')));
});
}
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