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
da4e997e
Unverified
Commit
da4e997e
authored
Dec 07, 2021
by
Gary Qian
Committed by
GitHub
Dec 07, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Short circuit v1 deprecation warning on plugin projects (#94769)
parent
47a8f440
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
0 deletions
+17
-0
project.dart
packages/flutter_tools/lib/src/project.dart
+10
-0
project_test.dart
packages/flutter_tools/test/general.shard/project_test.dart
+7
-0
No files found.
packages/flutter_tools/lib/src/project.dart
View file @
da4e997e
...
...
@@ -417,6 +417,9 @@ class AndroidProject extends FlutterProjectPlatform {
/// True if the parent Flutter project is a module.
bool
get
isModule
=>
parent
.
isModule
;
/// True if the parent Flutter project is a plugin.
bool
get
isPlugin
=>
parent
.
isPlugin
;
/// True if the Flutter project is using the AndroidX support library.
bool
get
usesAndroidX
=>
parent
.
usesAndroidX
;
...
...
@@ -595,6 +598,13 @@ The detected reason was:
// only supports the V2 embedding.
return
AndroidEmbeddingVersionResult
(
AndroidEmbeddingVersion
.
v2
,
'Is add-to-app module'
);
}
if
(
isPlugin
)
{
// Plugins do not use an appManifest, so we stop here.
//
// TODO(garyq): This method does not currently check for code references to
// the v1 embedding, we should check for this once removal is further along.
return
AndroidEmbeddingVersionResult
(
AndroidEmbeddingVersion
.
v2
,
'Is plugin'
);
}
if
(
appManifestFile
==
null
||
!
appManifestFile
.
existsSync
())
{
return
AndroidEmbeddingVersionResult
(
AndroidEmbeddingVersion
.
v1
,
'No `
${appManifestFile.absolute.path}
` file'
);
}
...
...
packages/flutter_tools/test/general.shard/project_test.dart
View file @
da4e997e
...
...
@@ -207,6 +207,13 @@ void main() {
project
.
checkForDeprecation
(
deprecationBehavior:
DeprecationBehavior
.
ignore
);
expect
(
testLogger
.
statusText
,
contains
(
'https://flutter.dev/go/android-project-migration'
));
});
_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
(
'No `<meta-data android:name="flutterEmbedding" android:value="2"/>` in '
)));
});
_testInMemory
(
'Android plugin without example app does not show a warning'
,
()
async
{
final
FlutterProject
project
=
await
aPluginProject
();
project
.
example
.
directory
.
deleteSync
();
...
...
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