Unverified Commit e6f69add authored by Anurag Roy's avatar Anurag Roy Committed by GitHub

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

parent 16038ac6
......@@ -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.'
);
}
......
......@@ -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,
......
......@@ -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,
});
......
......@@ -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>{
......
......@@ -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();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment