[flutter_tools] Replace android v2 embedding broken doc link (#107456)

This commit is contained in:
Anurag Roy 2022-07-13 02:01:07 +05:30 committed by GitHub
parent 16038ac69d
commit e6f69add99
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 9 additions and 9 deletions

View File

@ -436,7 +436,7 @@ Future<void> _writeAndroidPluginRegistrant(FlutterProject project, List<Plugin>
if (!supportsEmbeddingV1 && supportsEmbeddingV2) {
throwToolExit(
'The plugin `${plugin['name']}` requires your app to be migrated to '
'the Android embedding v2. Follow the steps on https://flutter.dev/go/android-project-migration '
'the Android embedding v2. Follow the steps on the migration doc above '
'and re-run this command.'
);
}

View File

@ -602,7 +602,7 @@ Your Flutter application is created using an older version of the Android
embedding. It is being deprecated in favor of Android embedding v2. Follow the
steps at
https://flutter.dev/go/android-project-migration
https://github.com/flutter/flutter/wiki/Upgrading-pre-1.12-Android-projects
to migrate your project. You may also pass the --ignore-deprecation flag to
ignore this check and continue with the deprecated v1 embedding. However,

View File

@ -786,7 +786,7 @@ void main() {
// Import for the new embedding class.
expect(mainActivity.contains('import io.flutter.embedding.android.FlutterActivity'), true);
expect(logger.statusText, isNot(contains('https://flutter.dev/go/android-project-migration')));
expect(logger.statusText, isNot(contains('https://github.com/flutter/flutter/wiki/Upgrading-pre-1.12-Android-projects')));
}, overrides: <Type, Generator>{
Logger: () => logger,
});

View File

@ -762,7 +762,7 @@ dependencies:
},
throwsToolExit(
message: 'The plugin `plugin1` requires your app to be migrated to the Android embedding v2. '
'Follow the steps on https://flutter.dev/go/android-project-migration and re-run this command.'
'Follow the steps on the migration doc above and re-run this command.'
),
);
}, overrides: <Type, Generator>{

View File

@ -195,7 +195,7 @@ void main() {
// android:name="flutterEmbedding" android:value="2" />.
project.checkForDeprecation(deprecationBehavior: DeprecationBehavior.ignore);
expect(testLogger.statusText, contains('https://flutter.dev/go/android-project-migration'));
expect(testLogger.statusText, contains('https://github.com/flutter/flutter/wiki/Upgrading-pre-1.12-Android-projects'));
});
_testInMemory('Android project not on v2 embedding exits', () async {
final FlutterProject project = await someProject();
@ -207,7 +207,7 @@ void main() {
Future<dynamic>.sync(() => project.checkForDeprecation(deprecationBehavior: DeprecationBehavior.exit)),
contains('Build failed due to use of deprecated Android v1 embedding.')
);
expect(testLogger.statusText, contains('https://flutter.dev/go/android-project-migration'));
expect(testLogger.statusText, contains('https://github.com/flutter/flutter/wiki/Upgrading-pre-1.12-Android-projects'));
expect(testLogger.statusText, contains('No `<meta-data android:name="flutterEmbedding" android:value="2"/>` in '));
});
_testInMemory('Project not on v2 embedding does not warn if deprecation status is irrelevant', () async {
@ -226,13 +226,13 @@ void main() {
// android:name="flutterEmbedding" android:value="2" />.
project.checkForDeprecation(deprecationBehavior: DeprecationBehavior.ignore);
expect(testLogger.statusText, contains('https://flutter.dev/go/android-project-migration'));
expect(testLogger.statusText, contains('https://github.com/flutter/flutter/wiki/Upgrading-pre-1.12-Android-projects'));
});
_testInMemory('Android plugin project does not throw v1 embedding deprecation warning', () async {
final FlutterProject project = await aPluginProject();
project.checkForDeprecation(deprecationBehavior: DeprecationBehavior.exit);
expect(testLogger.statusText, isNot(contains('https://flutter.dev/go/android-project-migration')));
expect(testLogger.statusText, isNot(contains('https://github.com/flutter/flutter/wiki/Upgrading-pre-1.12-Android-projects')));
expect(testLogger.statusText, isNot(contains('No `<meta-data android:name="flutterEmbedding" android:value="2"/>` in ')));
});
_testInMemory('Android plugin without example app does not show a warning', () async {
@ -240,7 +240,7 @@ void main() {
project.example.directory.deleteSync();
await project.regeneratePlatformSpecificTooling();
expect(testLogger.statusText, isNot(contains('https://flutter.dev/go/android-project-migration')));
expect(testLogger.statusText, isNot(contains('https://github.com/flutter/flutter/wiki/Upgrading-pre-1.12-Android-projects')));
});
_testInMemory('updates local properties for Android', () async {
final FlutterProject project = await someProject();