Move v1 embedding migration warning from plugin consumers to all apps (#64181)
This commit is contained in:
@@ -661,12 +661,6 @@ Future<void> _writeAndroidPluginRegistrant(FlutterProject project, List<Plugin>
|
||||
break;
|
||||
case AndroidEmbeddingVersion.v1:
|
||||
default:
|
||||
globals.printStatus(
|
||||
'Your Flutter application is created using an older version of the '
|
||||
"Android embedding. It's being deprecated in favor of Android embedding "
|
||||
'v2. Follow the steps on https://flutter.dev/go/android-project-migration '
|
||||
'to migrate your project.'
|
||||
);
|
||||
for (final Map<String, dynamic> plugin in androidPlugins) {
|
||||
if (!(plugin['supportsEmbeddingV1'] as bool) && plugin['supportsEmbeddingV2'] as bool) {
|
||||
throwToolExit(
|
||||
|
||||
@@ -756,6 +756,23 @@ class AndroidProject extends FlutterProjectPlatform {
|
||||
}
|
||||
|
||||
Future<void> ensureReadyForPlatformSpecificTooling() async {
|
||||
if (getEmbeddingVersion() == AndroidEmbeddingVersion.v1) {
|
||||
globals.printStatus(
|
||||
"""
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
Warning
|
||||
──────────────────────────────────────────────────────────────────────────────
|
||||
Your Flutter application is created using an older version of the Android
|
||||
embedding. It's being deprecated in favor of Android embedding v2. Follow the
|
||||
steps at
|
||||
|
||||
https://flutter.dev/go/android-project-migration
|
||||
|
||||
to migrate your project.
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
"""
|
||||
);
|
||||
}
|
||||
if (isModule && _shouldRegenerateFromTemplate()) {
|
||||
await _regenerateLibrary();
|
||||
// Add ephemeral host app, if an editable host app does not already exist.
|
||||
|
||||
Reference in New Issue
Block a user