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> ...@@ -436,7 +436,7 @@ Future<void> _writeAndroidPluginRegistrant(FlutterProject project, List<Plugin>
if (!supportsEmbeddingV1 && supportsEmbeddingV2) { if (!supportsEmbeddingV1 && supportsEmbeddingV2) {
throwToolExit( throwToolExit(
'The plugin `${plugin['name']}` requires your app to be migrated to ' '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.' 'and re-run this command.'
); );
} }
......
...@@ -602,7 +602,7 @@ Your Flutter application is created using an older version of the Android ...@@ -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 embedding. It is being deprecated in favor of Android embedding v2. Follow the
steps at 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 to migrate your project. You may also pass the --ignore-deprecation flag to
ignore this check and continue with the deprecated v1 embedding. However, ignore this check and continue with the deprecated v1 embedding. However,
......
...@@ -786,7 +786,7 @@ void main() { ...@@ -786,7 +786,7 @@ void main() {
// Import for the new embedding class. // Import for the new embedding class.
expect(mainActivity.contains('import io.flutter.embedding.android.FlutterActivity'), true); 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>{ }, overrides: <Type, Generator>{
Logger: () => logger, Logger: () => logger,
}); });
......
...@@ -762,7 +762,7 @@ dependencies: ...@@ -762,7 +762,7 @@ dependencies:
}, },
throwsToolExit( throwsToolExit(
message: 'The plugin `plugin1` requires your app to be migrated to the Android embedding v2. ' 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>{ }, overrides: <Type, Generator>{
......
...@@ -195,7 +195,7 @@ void main() { ...@@ -195,7 +195,7 @@ void main() {
// android:name="flutterEmbedding" android:value="2" />. // android:name="flutterEmbedding" android:value="2" />.
project.checkForDeprecation(deprecationBehavior: DeprecationBehavior.ignore); 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 { _testInMemory('Android project not on v2 embedding exits', () async {
final FlutterProject project = await someProject(); final FlutterProject project = await someProject();
...@@ -207,7 +207,7 @@ void main() { ...@@ -207,7 +207,7 @@ void main() {
Future<dynamic>.sync(() => project.checkForDeprecation(deprecationBehavior: DeprecationBehavior.exit)), Future<dynamic>.sync(() => project.checkForDeprecation(deprecationBehavior: DeprecationBehavior.exit)),
contains('Build failed due to use of deprecated Android v1 embedding.') 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 ')); 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 { _testInMemory('Project not on v2 embedding does not warn if deprecation status is irrelevant', () async {
...@@ -226,13 +226,13 @@ void main() { ...@@ -226,13 +226,13 @@ void main() {
// android:name="flutterEmbedding" android:value="2" />. // android:name="flutterEmbedding" android:value="2" />.
project.checkForDeprecation(deprecationBehavior: DeprecationBehavior.ignore); 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 { _testInMemory('Android plugin project does not throw v1 embedding deprecation warning', () async {
final FlutterProject project = await aPluginProject(); final FlutterProject project = await aPluginProject();
project.checkForDeprecation(deprecationBehavior: DeprecationBehavior.exit); 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 '))); 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 { _testInMemory('Android plugin without example app does not show a warning', () async {
...@@ -240,7 +240,7 @@ void main() { ...@@ -240,7 +240,7 @@ void main() {
project.example.directory.deleteSync(); project.example.directory.deleteSync();
await project.regeneratePlatformSpecificTooling(); 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 { _testInMemory('updates local properties for Android', () async {
final FlutterProject project = await someProject(); 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