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

Removed the legacy --plugin option from flutter create.  Fixes #11815.
This commit is contained in:
gspencergoog 2017-09-11 10:01:07 -07:00 committed by GitHub
parent ba5b5e7f6f
commit 267514346a
2 changed files with 1 additions and 28 deletions

View file

@ -50,12 +50,6 @@ class CreateCommand extends FlutterCommand {
},
defaultsTo: 'app',
);
argParser.addFlag(
'plugin',
negatable: false,
defaultsTo: false,
hide: true,
);
argParser.addOption(
'description',
defaultsTo: 'A new Flutter project.',
@ -124,9 +118,7 @@ class CreateCommand extends FlutterCommand {
if (!fs.isFileSync(fs.path.join(flutterDriverPackagePath, 'pubspec.yaml')))
throwToolExit('Unable to find package:flutter_driver in $flutterDriverPackagePath', exitCode: 2);
String template = argResults['template'];
if (argResults['plugin'])
template = 'plugin';
final String template = argResults['template'];
final bool generatePlugin = template == 'plugin';
final bool generatePackage = template == 'package';

View file

@ -116,25 +116,6 @@ void main() {
);
}, 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 {
return _createProject(
projectDir,