Remove isNewAndroidEmbeddingEnabled flag when reading an existing pro…#42684
Remove isNewAndroidEmbeddingEnabled flag when reading an existing pro…#42684blasten merged 6 commits intoflutter:masterfrom
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.
|
|
|
||
| final FlutterProject project = FlutterProject.fromPath('project'); | ||
| await injectPlugins(project); | ||
| await injectPlugins(project, checkProjects: true); |
There was a problem hiding this comment.
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.
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.
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?