Skip to content

[plugins] Update v2 embedding plugins to the latest stable release #47153

@mklim

Description

@mklim

The v2 embedding plugins added support for v1.9, but v1.12 adds a few fixes that help the v2 path significantly. We should migrate the plugins to use v1.12 now that it's the most recent stable.
For each plugin, we should:

  1. Change the minimum supported Flutter version in the pubspec.yaml to ^v1.12.13+hotfix.5.
  2. (Optional) Remove any constraint in the example's pubspec.yaml, if it exists.
  3. Remove the afterEvaluate block hacking in inclusion of the lifecycle library.
  4. Add the embedding v2 metadata xml tag. Otherwise, we're not autogenerating the v2 plugin registration. But since the tool can only autogenerate for one version of the embedding (even if it can toggle between v1 and v2 plugin APIs against the v2 embedding), we'd have to manually register the plugin in the EmbedderV1Activity.java.
  5. Change to the getBinaryMessenger getter since getFlutterEngine.getDartExecutor is deprecated.
  6. (Optional) we can remove the MainActivity for the v2 embedding in the example now since it has no content.
  7. Bump the plugin version

These look like the plugins that need to be updated:

ETA: The current state of these plugins also print out deprecation warnings at build time because they access getEngine() directly.

Metadata

Metadata

Assignees

Labels

a: existing-appsIntegration with existing apps via the add-to-app flowp: firebaseFirebase pluginspackageflutter/packages repository. See also p: labels.platform-androidAndroid applications specifically

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions