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
841f2e08
Unverified
Commit
841f2e08
authored
Feb 20, 2021
by
Jenn Magder
Committed by
GitHub
Feb 20, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not show plugin embedding warning with missing example app (#76406)
parent
c6a74e0a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
1 deletion
+13
-1
project.dart
packages/flutter_tools/lib/src/project.dart
+4
-1
project_test.dart
packages/flutter_tools/test/general.shard/project_test.dart
+9
-0
No files found.
packages/flutter_tools/lib/src/project.dart
View file @
841f2e08
...
...
@@ -217,6 +217,9 @@ class FlutterProject {
/// True if this project is a Flutter module project.
bool
get
isModule
=>
manifest
.
isModule
;
/// True if this project is a Flutter plugin project.
bool
get
isPlugin
=>
manifest
.
isPlugin
;
/// True if the Flutter project is using the AndroidX support library.
bool
get
usesAndroidX
=>
manifest
.
usesAndroidX
;
...
...
@@ -285,7 +288,7 @@ class FlutterProject {
bool
windowsPlatform
=
false
,
bool
webPlatform
=
false
,
})
async
{
if
(!
directory
.
existsSync
()
||
hasExampleApp
)
{
if
(!
directory
.
existsSync
()
||
hasExampleApp
||
isPlugin
)
{
return
;
}
await
refreshPluginsList
(
this
,
iosPlatform:
iosPlatform
,
macOSPlatform:
macOSPlatform
);
...
...
packages/flutter_tools/test/general.shard/project_test.dart
View file @
841f2e08
...
...
@@ -185,6 +185,13 @@ void main() {
await
project
.
regeneratePlatformSpecificTooling
();
expect
(
testLogger
.
statusText
,
contains
(
'https://flutter.dev/go/android-project-migration'
));
});
_testInMemory
(
'Android plugin without example app does not show a warning'
,
()
async
{
final
FlutterProject
project
=
await
aPluginProject
();
project
.
example
.
directory
.
deleteSync
();
await
project
.
regeneratePlatformSpecificTooling
();
expect
(
testLogger
.
statusText
,
isNot
(
contains
(
'https://flutter.dev/go/android-project-migration'
)));
});
_testInMemory
(
'updates local properties for Android'
,
()
async
{
final
FlutterProject
project
=
await
someProject
();
await
project
.
regeneratePlatformSpecificTooling
();
...
...
@@ -306,6 +313,7 @@ void main() {
group
(
'example'
,
()
{
_testInMemory
(
'exists for plugin in legacy format'
,
()
async
{
final
FlutterProject
project
=
await
aPluginProject
();
expect
(
project
.
isPlugin
,
isTrue
);
expect
(
project
.
hasExampleApp
,
isTrue
);
});
_testInMemory
(
'exists for plugin in multi-platform format'
,
()
async
{
...
...
@@ -314,6 +322,7 @@ void main() {
});
_testInMemory
(
'does not exist for non-plugin'
,
()
async
{
final
FlutterProject
project
=
await
someProject
();
expect
(
project
.
isPlugin
,
isFalse
);
expect
(
project
.
hasExampleApp
,
isFalse
);
});
});
...
...
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