Skip to content

Skip plugins that don't have an android impl when building AARs#46835

Merged
blasten merged 1 commit intoflutter:masterfrom
blasten:aar_skip_non_android_plugins
Dec 12, 2019
Merged

Skip plugins that don't have an android impl when building AARs#46835
blasten merged 1 commit intoflutter:masterfrom
blasten:aar_skip_non_android_plugins

Conversation

@blasten
Copy link

@blasten blasten commented Dec 12, 2019

Description

When the tool builds the plugins as AAR, it doesn't skip plugins that don't have an android implementation.

Related Issues

#46807
#46790

Tests

I added the following tests: Unit test.

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 read the [Tree Hygiene] wiki page, which explains my responsibilities.
  • 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

Did any tests fail when you ran them? Please read [Handling breaking changes].

  • No, no existing tests failed, so this is not a breaking change.

@fluttergithubbot fluttergithubbot added the tool Affects the "flutter" command-line tool. See also t: labels. label Dec 12, 2019
@blasten blasten requested a review from amirh December 12, 2019 02:19
assert(pluginDirectory.existsSync());

final String pluginName = pluginParts.first;
if (!pluginDirectory.childDirectory('android').existsSync()) {
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: should we check for a android/build.gradle instead to trigger less FNs?

Copy link
Author

@blasten blasten Dec 12, 2019

Choose a reason for hiding this comment

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

well. detecting a valid Gradle project requires checking additional files. Is that what we want or just Android-platform support? I think the current definition of that is an 'android' directory.

Copy link
Contributor

Choose a reason for hiding this comment

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

I see your point, I mentioned it as I thought we'd want to be consistent with what we've done here: #40640

Copy link
Contributor

@amirh amirh left a comment

Choose a reason for hiding this comment

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

LGTM

@blasten blasten merged commit a467932 into flutter:master Dec 12, 2019
@blasten blasten deleted the aar_skip_non_android_plugins branch December 12, 2019 20:38
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 2, 2021
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.

4 participants