Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
e6f69add
Unverified
Commit
e6f69add
authored
Jul 12, 2022
by
Anurag Roy
Committed by
GitHub
Jul 12, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[flutter_tools] Replace android v2 embedding broken doc link (#107456)
parent
16038ac6
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
9 additions
and
9 deletions
+9
-9
flutter_plugins.dart
packages/flutter_tools/lib/src/flutter_plugins.dart
+1
-1
project.dart
packages/flutter_tools/lib/src/project.dart
+1
-1
create_test.dart
...tter_tools/test/commands.shard/permeable/create_test.dart
+1
-1
plugins_test.dart
packages/flutter_tools/test/general.shard/plugins_test.dart
+1
-1
project_test.dart
packages/flutter_tools/test/general.shard/project_test.dart
+5
-5
No files found.
packages/flutter_tools/lib/src/flutter_plugins.dart
View file @
e6f69add
...
@@ -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.'
);
);
}
}
...
...
packages/flutter_tools/lib/src/project.dart
View file @
e6f69add
...
@@ -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,
...
...
packages/flutter_tools/test/commands.shard/permeable/create_test.dart
View file @
e6f69add
...
@@ -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
,
});
});
...
...
packages/flutter_tools/test/general.shard/plugins_test.dart
View file @
e6f69add
...
@@ -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
>{
...
...
packages/flutter_tools/test/general.shard/project_test.dart
View file @
e6f69add
...
@@ -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
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment