mirror of
https://github.com/flutter/flutter
synced 2024-10-14 04:02:56 +00:00
Remove legacy --plugin option from flutter create (#12020)
Removed the legacy --plugin option from flutter create. Fixes #11815.
This commit is contained in:
parent
ba5b5e7f6f
commit
267514346a
|
@ -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';
|
||||
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue