Skip to content

Flutter Plugin Tool supports multi-platform plugin config - #38632

Merged
iskakaushik merged 12 commits into
flutter:masterfrom
iskakaushik:issue-10288
Aug 30, 2019
Merged

iskakaushik merged 12 commits into
flutter:masterfrom
iskakaushik:issue-10288

Conversation

@iskakaushik

@iskakaushik iskakaushik commented Aug 15, 2019 •

Copy link
Copy Markdown
Contributor

Description

This addresses #10288 partially.

I'm currently re-using a Plugin pojo. There will be some follow up work
here:

  1. [DONE] Migrate the current pojo to have a Map<String, PlatformPlugin> and have
    impls for: AndroidPlatformPlugin, IOSPlatformPlugin,
    MacOSPlatformPlugin. They can each contain their own fields.

  2. Add more meaningful error messages to the tool when we encounter any
    invalid configurations. Currently there is not much error handling done.

  3. [DONE] Address Flutter Tool currently does not allow different plugin class names for android and ios impls #38628

Related Issues

  1. Reliable way of detecting if a plugin supports Android, or iOS, or both #10288
  2. Flutter Tool currently does not allow different plugin class names for android and ios impls #38628
  3. Switch macOS plugin handling to formal declaration #33597

Tests

I added the following tests: plugin_parsing_test.dart.

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.

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I signed the CLA.
  • I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
  • I updated/added relevant documentation (doc comments with ///).
  • All existing and new tests are passing.
  • The analyzer (flutter analyze --flutter-repo) does not report any problems on my PR.
  • I am willing to follow-up on review comments in a timely manner.

Breaking Change

Does your PR require Flutter developers to manually update their apps to accommodate your change?

  • Yes, this is a breaking change (Please read Handling breaking changes). Replace this with a link to the e-mail where you asked for input on this proposed change.
  • No, this is not a breaking change.

This addresses flutter#10288
partially.

I'm currently re-using a Plugin pojo. There will be some follow up work
here:

1. Migrate the current pojo to have a `Set<PlatformPlugin>` and have
impls for: `AndroidPlatformPlugin`, `IOSPlatformPlugin`,
      `MacOSPlatformPlugin`. They can each contain their own fields.

2. Add more meaningful error messages to the tool when we encounter any
invalid configurations. Currently there is not much error handling done.

3. Address flutter#38628
@fluttergithubbot fluttergithubbot added the tool Affects the "flutter" command-line tool. See also t: labels. label Aug 15, 2019
@iskakaushik

Copy link
Copy Markdown
Contributor Author

@amirh i'm staging this PR to get any initial feedback you had about the vision.

I do not intend to land it in its current state. I will have follow-up work to address the things listed in the PR description.

/// Parses [Plugin] specification from the provided pluginYaml.
///
/// This currently supports two formats. V1 (Legacy) and V2 (Multi-platform).
/// Example V1 format. Which is deprecated.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

V1 and V2 might be confusing. Might be better to stick with just Legacy and MultiPlatform as the canonical names for these.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

legacy and multiplat sounds reasonable.

if (androidConfig['pluginClass'] != null) {
pluginClassNames.add(androidConfig['pluginClass']);
} else {
throw Exception('"pluginClass" needs to be specified for android platform');

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

might be worth creating a new exception type for failures relating to parsing a plugin. I haven't seen any custom exceptions in the flutter_tools project so I stuck with Exception.

@iskakaushik

Copy link
Copy Markdown
Contributor Author

I'm also changing the current parameters and namespacing them as they relate to the new format:

  • androidPackage becomes android -> package
  • iosPrefix becomes ios -> classPrefix

@jonahwilliams jonahwilliams left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This approach as written seems to require only well known keys, but platforms themselves are an open set. Furthermore, we'd also like each platform to be able to require/supply its own keys, so the main manifest class should probably not be responsible for parsing them.

@iskakaushik iskakaushik changed the title [part-1] Flutter Plugin Tool supports multi-platform plugin config [WIP] Flutter Plugin Tool supports multi-platform plugin config Aug 15, 2019
}

/// Contains all the required parameters to template an Android plugin.
class AndroidPlugin extends PlatformPlugin {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems like a better approach for splitting up the plugins. It would also be helpful to add some sort of unknown/unspecified platform that handles keys we don't recognize.

};
}

static const String kConfigKey = 'android';

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit, place the fields above the first method.

}

/// Contains all the required parameters to template an Android plugin.
class AndroidPlugin extends PlatformPlugin {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the well known plugin types, please add documentation for the expected keys and their meaning

platformPlugins[MacOSPlugin.kConfigKey] =
MacOSPlugin.fromYaml(name, platforms[MacOSPlugin.kConfigKey]);
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would restructure this so that we can grab unspecified platforms as well as known platforms.

@codecov

codecov Bot commented Aug 16, 2019

Copy link
Copy Markdown

Codecov Report

Merging #38632 into master will decrease coverage by 0.79%.
The diff coverage is 74.66%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #38632     +/-   ##
=========================================
- Coverage      56%    55.2%   -0.8%     
=========================================
  Files         195      196      +1     
  Lines       18231    18285     +54     
=========================================
- Hits        10210    10094    -116     
- Misses       8021     8191    +170
Flag Coverage Δ
#flutter_tool 55.2% <74.66%> (-0.8%) ⬇️
Impacted Files Coverage Δ
...ckages/flutter_tools/lib/src/platform_plugins.dart 56.75% <56.75%> (ø)
packages/flutter_tools/lib/src/plugins.dart 86.25% <92.1%> (+3.8%) ⬆️
...ckages/flutter_tools/lib/src/commands/channel.dart 3.07% <0%> (-69.24%) ⬇️
...ckages/flutter_tools/lib/src/reporting/events.dart 78.57% <0%> (-19.65%) ⬇️
...ackages/flutter_tools/lib/src/resident_runner.dart 36.11% <0%> (-17.27%) ⬇️
packages/flutter_tools/lib/src/ios/mac.dart 10.99% <0%> (-16.84%) ⬇️
packages/flutter_tools/lib/src/compile.dart 67.35% <0%> (-8.94%) ⬇️
packages/flutter_tools/lib/src/run_hot.dart 63.49% <0%> (-5.4%) ⬇️
packages/flutter_tools/lib/src/context_runner.dart 64.7% <0%> (-3.93%) ⬇️
packages/flutter_tools/lib/src/version.dart 88.78% <0%> (-3.91%) ⬇️
... and 15 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a24bfed...0827a1c. Read the comment docs.

1 similar comment
@codecov

codecov Bot commented Aug 16, 2019

Copy link
Copy Markdown

Codecov Report

Merging #38632 into master will decrease coverage by 0.79%.
The diff coverage is 74.66%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #38632     +/-   ##
=========================================
- Coverage      56%    55.2%   -0.8%     
=========================================
  Files         195      196      +1     
  Lines       18231    18285     +54     
=========================================
- Hits        10210    10094    -116     
- Misses       8021     8191    +170
Flag Coverage Δ
#flutter_tool 55.2% <74.66%> (-0.8%) ⬇️
Impacted Files Coverage Δ
...ckages/flutter_tools/lib/src/platform_plugins.dart 56.75% <56.75%> (ø)
packages/flutter_tools/lib/src/plugins.dart 86.25% <92.1%> (+3.8%) ⬆️
...ckages/flutter_tools/lib/src/commands/channel.dart 3.07% <0%> (-69.24%) ⬇️
...ckages/flutter_tools/lib/src/reporting/events.dart 78.57% <0%> (-19.65%) ⬇️
...ackages/flutter_tools/lib/src/resident_runner.dart 36.11% <0%> (-17.27%) ⬇️
packages/flutter_tools/lib/src/ios/mac.dart 10.99% <0%> (-16.84%) ⬇️
packages/flutter_tools/lib/src/compile.dart 67.35% <0%> (-8.94%) ⬇️
packages/flutter_tools/lib/src/run_hot.dart 63.49% <0%> (-5.4%) ⬇️
packages/flutter_tools/lib/src/context_runner.dart 64.7% <0%> (-3.93%) ⬇️
packages/flutter_tools/lib/src/version.dart 88.78% <0%> (-3.91%) ⬇️
... and 15 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a24bfed...0827a1c. Read the comment docs.

@codecov

codecov Bot commented Aug 16, 2019 •

Copy link
Copy Markdown

Codecov Report

Merging #38632 into master will increase coverage by 0.24%.
The diff coverage is 83.62%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #38632      +/-   ##
==========================================
+ Coverage   56.54%   56.78%   +0.24%     
==========================================
  Files         195      196       +1     
  Lines       18471    18556      +85     
==========================================
+ Hits        10444    10537      +93     
+ Misses       8027     8019       -8
Flag Coverage Δ
#flutter_tool 56.78% <83.62%> (+0.24%) ⬆️
Impacted Files Coverage Δ
...ckages/flutter_tools/lib/src/flutter_manifest.dart 85.18% <100%> (+1.85%) ⬆️
...ckages/flutter_tools/lib/src/platform_plugins.dart 82.5% <82.5%> (ø)
packages/flutter_tools/lib/src/plugins.dart 83.33% <82.6%> (+0.87%) ⬆️
.../flutter_tools/lib/src/commands/build_fuchsia.dart 13.63% <0%> (-68.19%) ⬇️
packages/flutter_tools/lib/src/web/workflow.dart 46.15% <0%> (-38.47%) ⬇️
...r_tools/lib/src/runner/flutter_command_runner.dart 57.85% <0%> (-11.58%) ⬇️
...tools/lib/src/fuchsia/fuchsia_kernel_compiler.dart 0% <0%> (-7.7%) ⬇️
packages/flutter_tools/lib/src/artifacts.dart 62.84% <0%> (-6.25%) ⬇️
packages/flutter_tools/lib/src/version.dart 87.08% <0%> (-5.75%) ⬇️
...ges/flutter_tools/lib/src/fuchsia/fuchsia_sdk.dart 64.81% <0%> (-3.71%) ⬇️
... and 10 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 35de8d5...3de247d. Read the comment docs.

Comment thread packages/flutter_tools/lib/src/platform_plugins.dart Outdated
Comment thread packages/flutter_tools/lib/src/plugins.dart Outdated
Comment thread packages/flutter_tools/lib/src/plugins.dart Outdated
Comment thread packages/flutter_tools/lib/src/plugins.dart Outdated
Comment thread packages/flutter_tools/lib/src/plugins.dart Outdated
Comment thread packages/flutter_tools/test/general.shard/plugin_parsing_test.dart
Comment thread packages/flutter_tools/lib/src/platform_plugins.dart Outdated
@iskakaushik

Copy link
Copy Markdown
Contributor Author

@stuartmorgan , I have removed all references to macOS in legacy format, i did not realize that none of them were published. I also included macOS plugin in the test that I wrote.

@jonahwilliams , I have added the documentation about the required fields for the plugins. I have also filed #38853 to address support for unknown/unsupported plugins. I will add support for them in a follow-up PR.

I have also resolved the other comments you have given me. PTAL and thanks!

@required this.pluginClass,
});

factory AndroidPlugin.fromYaml(String name, dynamic yaml) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be a YamlMap to work right?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It also works with dynamic yaml. Changing it to YamlMap yaml does make it better. Fixed!

@iskakaushik iskakaushik changed the title [WIP] Flutter Plugin Tool supports multi-platform plugin config Flutter Plugin Tool supports multi-platform plugin config Aug 19, 2019

@stuartmorgan-g stuartmorgan-g left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but please wait for @jonahwilliams's approval as well.

I'll try to prep the FDE change that will handle the macOS breaking change tonight.

@jonahwilliams jonahwilliams left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@stuartmorgan-g stuartmorgan-g left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, a couple of things I missed that I noticed while doing the FDE change:

  • This check needs to be updated. I think it's fine to just remove the comment and s/macosPrefix/macos/. Ideally we should do a full parse to avoid possible collisions, but at this point there's no other 'macos' key so I think we can keep it simple for now.
  • While searching for any other places that might be referenced I found this schema, which should be updated too.

stuartmorgan-g added a commit to stuartmorgan-g/flutter-desktop-embedding that referenced this pull request Aug 20, 2019
Updates all plugins to conform to the new plugin schema in
flutter/flutter#38632

@amirh amirh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM overall, left a few nits.

Map<String, dynamic> toMap() {
return <String, dynamic>{
'name': name,
'prefix': classPrefix,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now is a good opportunity to get rid of this prefix as well if we want to do so, I'm not sure what is it useful for...

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can't AFAICT; see this comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Though we won't be breaking any existing code if we do it right now, we would make the migration that have to happen anyway harder (I'd think not by much).

On a related note - Stuart do you think it would be useful to have a (potentially optional) fileName parameter here and for macOS?

@stuartmorgan-g stuartmorgan-g Aug 20, 2019 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Though we won't be breaking any existing code if we do it right now, we would make the migration that have to happen anyway harder (I'd think not by much).

I don't follow. If you remove the parameter, then it's impossible to describe existing ObjC plugins using the new format. Are you suggesting we require everyone to rename their source files when migrating?

On a related note - Stuart do you think it would be useful to have a (potentially optional) fileName parameter here and for macOS?

It's not clear to me how replacing classPrefix with fileName helps; it seems like the net effect is that we are still stuck with an extra parameter that we would rather not have, but with the added downside that migration between old and new formats is less obvious.

I don't want it for macOS; I can't see any compelling non-legacy reason to support custom filenames for source files when the convention of filename=class name is simple, and widely used in general.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Though we won't be breaking any existing code if we do it right now, we would make the migration that have to happen anyway harder (I'd think not by much).

I don't follow. If you remove the parameter, then it's impossible to describe existing ObjC plugins using the new format. Are you suggesting we require everyone to rename their source files when migrating?

Yes.

On a related note - Stuart do you think it would be useful to have a (potentially optional) fileName parameter here and for macOS?

It's not clear to me how replacing classPrefix with fileName helps; it seems like the net effect is that we are still stuck with an extra parameter that we would rather not have, but with the added downside that migration between old and new formats is less obvious.

I don't want it for macOS; I can't see any compelling non-legacy reason to support custom filenames for source files when the convention of filename=class name is simple, and widely used in general.

Makes sense, I didn't have a preference here, just wanted to check because if we would want to eventually support that we should not introduce extra migration pain right now.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you're okay with including a file rename step in the migration for most existing plugins, then I would agree with removing classPrefix. (The plugin template for language=objc would need to be updated accordingly.) That would need to be prominently documented somewhere.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's start without classPrefix, when this PR makes it to stable we essentially start a "soft migration" period (as we still support the old schema). If we learn that the migration is too painful we could later add classPrefix (it shouldn't be breaking for plugins that already migrated without classPrefix).

We will definitely need documentation and announcements around this migration.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's start without classPrefix

Then we'll need to change the objc plugin template (even though it's no longer the default, it can still be selected) to create the files with the prefixes included in the same PR that changes the pubspec.yaml in the template. (Which doesn't need to be this PR, but if it's not going to be, then let's get an issue tracking that so it doesn't get forgotten.)

// an indicator of macOS support, see https://github.com/flutter/flutter/issues/33597
macosPrefix = pluginYaml['macosPrefix'];
pluginClass = pluginYaml['pluginClass'];
// TODO(kaushikiska): Fail if both old and new formats are present.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should get to this early, before this change breaks anyone.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

final String iosPrefix;
final String macosPrefix;
final String pluginClass;
final Map<String, PlatformPlugin> platformPlugins;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: sounds a little weird for a plugin to have a set of "platform plugins" maybe we should call this field platforms, and the type PluginPlatform?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

final String iosPrefix;
final String macosPrefix;
final String pluginClass;
final Map<String, PlatformPlugin> platformPlugins;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: document that this is mapping a platform key to the plugin's platform spec.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

}
''';

List<Map<String, dynamic>> _filterPlugins(List<Plugin> plugins, String type) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Was a little unclear what this is filtering for from the name, and it also does more than filtering. Maybe call this _extractPlatformMaps ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

''';

List<Map<String, dynamic>> _filterPlugins(List<Plugin> plugins, String type) {
final List<Map<String, dynamic>> pluginConfigs = <Map<String, dynamic>>[];

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: you may be able to do this nicely with list operators if you like them e.g:

final List<Plugin> filteredPlugins = plugins.retainWhere((Plugin p) => p.platforms.containsKey(platform));
return filteredPlugins.map((Plugin p) => p.toMap());

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does not return a List, it returns an Iterable

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.toList? (and update the first type)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I find the current implementation quite easy to follow, leaving it as is.

@amirh

amirh commented Aug 26, 2019

Copy link
Copy Markdown
Contributor

cc @mit-mit @jonasfj

Kaushik Iska added 2 commits August 28, 2019 08:25
@iskakaushik
iskakaushik requested a review from jmagman as a code owner August 28, 2019 15:26
package: com.example
pluginClass: MyPlugin
ios:
prefix: FLT

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove

@amirh amirh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@iskakaushik
iskakaushik merged commit fc05c37 into flutter:master Aug 30, 2019
stuartmorgan-g added a commit to google/flutter-desktop-embedding that referenced this pull request Aug 31, 2019
Updates all plugins to conform to the new macOS plugin schema in
flutter/flutter#38632
}
if (pluginYaml != null && pluginYaml['platforms'] != null) {
return Plugin._fromMultiPlatformYaml(name, path, pluginYaml);
} else {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

else not needed.

}

static List<String> validatePluginYaml(YamlMap yaml) {
if (yaml.containsKey('platforms')) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flip the sense and un-indent the larger block:

if (!yaml.containsKey('platform')) {
  return _validateLegacyYaml(yaml);
}
// no else, un-indent.

return <String>[
'Invalid plugin specification. There must be only one key: "platforms", found multiple: ${yaml.keys.join(',')}'
];
} else {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

else not needed.

'Invalid plugin specification. There must be only one key: "platforms", found multiple: ${yaml.keys.join(',')}'
];
} else {
return _validateMultiPlatformYaml(yaml['platforms']);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If yaml['platforms'] is not a YamlMap, then this call will throw a runtime type error. Please add a check, and return an error instead.

static List<String> _validateMultiPlatformYaml(YamlMap yaml) {
final List<String> errors = <String>[];
if (yaml.containsKey(AndroidPlugin.kConfigKey) &&
!AndroidPlugin.validate(yaml[AndroidPlugin.kConfigKey])) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto. Check the type of yaml[AndroidPlugin.kConfigKey] etc. and add appropriate error messages.

name: test
flutter:
plugin:
platforms:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add tests that cover the cases where these maps are malformed, esp as noted above where they are not maps.

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Aug 4, 2021
github-merge-queue Bot pushed a commit that referenced this pull request Jul 2, 2025
Closes #38632.

Mostly clarifies how validation works, and reuses some code.
mboetger pushed a commit to mboetger/flutter that referenced this pull request Jul 21, 2025
…lutter#171461)

Closes flutter#38632.

Mostly clarifies how validation works, and reuses some code.
lucaantonelli pushed a commit to lucaantonelli/flutter that referenced this pull request Nov 21, 2025
…lutter#171461)

Closes flutter#38632.

Mostly clarifies how validation works, and reuses some code.
Nakiha pushed a commit to Nakiha/VoidPlayer-Flutter that referenced this pull request Sep 28, 2026
Closes flutter/flutter#38632.

Mostly clarifies how validation works, and reuses some code.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants