From 9d4a35ba8b822862e52b320120527aab313db855 Mon Sep 17 00:00:00 2001 From: stuartmorgan Date: Thu, 30 Jan 2020 11:30:31 -0800 Subject: [PATCH] Always use new plugin schema for plugin template (#48258) Now that the new schema is supported on the stable channel, and the old schema is considered legacy, the template should always create plugins using the new schema. --- .../flutter_tools/lib/src/commands/create.dart | 4 ---- .../templates/plugin/pubspec.yaml.tmpl | 17 ++--------------- 2 files changed, 2 insertions(+), 19 deletions(-) diff --git a/packages/flutter_tools/lib/src/commands/create.dart b/packages/flutter_tools/lib/src/commands/create.dart index ea11e67449..827ec4fd20 100644 --- a/packages/flutter_tools/lib/src/commands/create.dart +++ b/packages/flutter_tools/lib/src/commands/create.dart @@ -642,10 +642,6 @@ To edit platform code in an IDE see https://flutter.dev/developing-packages/#edi 'web': web, 'macos': macos, 'year': DateTime.now().year, - // For now, the new plugin schema is only used when a desktop plugin is - // enabled. Once the new schema is supported on stable, this should be - // removed, and the new schema should always be used. - 'useNewPluginSchema': macos, // If a desktop platform is included, add a workaround for #31366. // When Linux and Windows are added, we will need this workaround again. 'includeTargetPlatformWorkaround': false, diff --git a/packages/flutter_tools/templates/plugin/pubspec.yaml.tmpl b/packages/flutter_tools/templates/plugin/pubspec.yaml.tmpl index 9408d34f11..db0a5ee768 100644 --- a/packages/flutter_tools/templates/plugin/pubspec.yaml.tmpl +++ b/packages/flutter_tools/templates/plugin/pubspec.yaml.tmpl @@ -21,23 +21,9 @@ dev_dependencies: # The following section is specific to Flutter. flutter: # This section identifies this Flutter project as a plugin project. -{{^useNewPluginSchema}} - # The androidPackage and pluginClass identifiers should not ordinarily - # be modified. They are used by the tooling to maintain consistency when - # adding or updating assets for this project. - plugin: - androidPackage: {{androidIdentifier}} - pluginClass: {{pluginClass}} -{{/useNewPluginSchema}} -{{#useNewPluginSchema}} # The 'pluginClass' and Android 'package' identifiers should not ordinarily # be modified. They are used by the tooling to maintain consistency when # adding or updating assets for this project. - # - # NOTE: This new plugin description format is not supported on Flutter's - # stable channel as of 1.9.1. A plugin published using this format will not - # work for most clients until the next major stable release. - # However, it is required in order to declare macOS support. plugin: platforms: android: @@ -45,9 +31,10 @@ flutter: pluginClass: {{pluginClass}} ios: pluginClass: {{pluginClass}} +{{#macos}} macos: pluginClass: {{pluginClass}} -{{/useNewPluginSchema}} +{{/macos}} # To add assets to your plugin package, add an assets section, like this: # assets: