Commit 26751434 authored by gspencergoog's avatar gspencergoog Committed by GitHub

Remove legacy --plugin option from flutter create (#12020)

Removed the legacy --plugin option from flutter create.  Fixes #11815.
parent ba5b5e7f
...@@ -50,12 +50,6 @@ class CreateCommand extends FlutterCommand { ...@@ -50,12 +50,6 @@ class CreateCommand extends FlutterCommand {
}, },
defaultsTo: 'app', defaultsTo: 'app',
); );
argParser.addFlag(
'plugin',
negatable: false,
defaultsTo: false,
hide: true,
);
argParser.addOption( argParser.addOption(
'description', 'description',
defaultsTo: 'A new Flutter project.', defaultsTo: 'A new Flutter project.',
...@@ -124,9 +118,7 @@ class CreateCommand extends FlutterCommand { ...@@ -124,9 +118,7 @@ class CreateCommand extends FlutterCommand {
if (!fs.isFileSync(fs.path.join(flutterDriverPackagePath, 'pubspec.yaml'))) if (!fs.isFileSync(fs.path.join(flutterDriverPackagePath, 'pubspec.yaml')))
throwToolExit('Unable to find package:flutter_driver in $flutterDriverPackagePath', exitCode: 2); throwToolExit('Unable to find package:flutter_driver in $flutterDriverPackagePath', exitCode: 2);
String template = argResults['template']; final String template = argResults['template'];
if (argResults['plugin'])
template = 'plugin';
final bool generatePlugin = template == 'plugin'; final bool generatePlugin = template == 'plugin';
final bool generatePackage = template == 'package'; final bool generatePackage = template == 'package';
......
...@@ -116,25 +116,6 @@ void main() { ...@@ -116,25 +116,6 @@ void main() {
); );
}, timeout: const Timeout.factor(2.0)); }, timeout: const Timeout.factor(2.0));
testUsingContext('plugin project (legacy)', () async {
return _createProject(
projectDir,
<String>['--no-pub', '--plugin'],
<String>[
'android/src/main/java/com/yourcompany/flutterproject/FlutterProjectPlugin.java',
'ios/Classes/FlutterProjectPlugin.h',
'ios/Classes/FlutterProjectPlugin.m',
'lib/flutter_project.dart',
'example/android/app/src/main/java/com/yourcompany/flutterprojectexample/MainActivity.java',
'example/ios/Runner/AppDelegate.h',
'example/ios/Runner/AppDelegate.m',
'example/ios/Runner/main.m',
'example/lib/main.dart',
],
plugin: true,
);
});
testUsingContext('kotlin/swift plugin project', () async { testUsingContext('kotlin/swift plugin project', () async {
return _createProject( return _createProject(
projectDir, projectDir,
......
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