Reland: Always use new plugin schema for plugin template (#49832)

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.
This commit is contained in:
stuartmorgan
2020-02-27 22:48:25 -08:00
committed by GitHub
parent 9de7787f25
commit 33bb1faf5b
4 changed files with 29 additions and 25 deletions

View File

@@ -6,6 +6,7 @@ homepage:
environment:
sdk: ">=2.1.0 <3.0.0"
flutter: ">=1.10.0"
dependencies:
flutter:
@@ -21,23 +22,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 +32,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: