From 267514346a5db148c631327e729dd91799863478 Mon Sep 17 00:00:00 2001 From: gspencergoog Date: Mon, 11 Sep 2017 10:01:07 -0700 Subject: [PATCH] Remove legacy --plugin option from flutter create (#12020) Removed the legacy --plugin option from flutter create. Fixes #11815. --- .../lib/src/commands/create.dart | 10 +--------- .../test/commands/create_test.dart | 19 ------------------- 2 files changed, 1 insertion(+), 28 deletions(-) diff --git a/packages/flutter_tools/lib/src/commands/create.dart b/packages/flutter_tools/lib/src/commands/create.dart index 9e7160173a..6e31fa93b6 100644 --- a/packages/flutter_tools/lib/src/commands/create.dart +++ b/packages/flutter_tools/lib/src/commands/create.dart @@ -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'; diff --git a/packages/flutter_tools/test/commands/create_test.dart b/packages/flutter_tools/test/commands/create_test.dart index 359fdd93ad..c0bd18d373 100644 --- a/packages/flutter_tools/test/commands/create_test.dart +++ b/packages/flutter_tools/test/commands/create_test.dart @@ -116,25 +116,6 @@ void main() { ); }, timeout: const Timeout.factor(2.0)); - testUsingContext('plugin project (legacy)', () async { - return _createProject( - projectDir, - ['--no-pub', '--plugin'], - [ - '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,