-
Notifications
You must be signed in to change notification settings - Fork 29k
Remove isNewAndroidEmbeddingEnabled flag when reading an existing pro… #42684
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov Report
@@ Coverage Diff @@
## master #42684 +/- ##
==========================================
- Coverage 60.21% 59.84% -0.38%
==========================================
Files 194 194
Lines 18877 18875 -2
==========================================
- Hits 11367 11295 -72
- Misses 7510 7580 +70
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -273,7 +273,7 @@ void main() { | |||
..writeAsStringSync('Existing release config'); | |||
|
|||
final FlutterProject project = FlutterProject.fromPath('project'); | |||
await injectPlugins(project); | |||
await injectPlugins(project, checkProjects: true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this related to this PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep. When this flag is true, injectPlugins
skips generating the Android plugin registrant since there isn't an android/
directory in the project under test.
@@ -360,9 +360,6 @@ List<Map<String, dynamic>> _extractPlatformMaps(List<Plugin> plugins, String typ | |||
/// Returns the version of the Android embedding that the current | |||
/// [project] is using. | |||
String _getAndroidEmbeddingVersion(FlutterProject project) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unrelated to this PR, just curious - would it be possible / make sense for the logic here and in _getEmbeddingVersion in platform_plugins.dart
to be the same? (seems like one is deciding based on a manifest key and the other based on Java imports?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't have the app's main class name in pubspec.yaml, so that would require an extra hop. One possibility is that we get the main app class/package from AndroidManifest.xml
and then check the import in the java class. That would still require to parse the XML file.
Description
The flag is still relevant for
flutter create
.Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes (
[x]
). This will ensure a smooth and quick review process.///
).flutter analyze --flutter-repo
) does not report any problems on my PR.Breaking Change
Does your PR require Flutter developers to manually update their apps to accommodate your change?