这是indexloc提供的服务,不要输入任何密码
Skip to content

Print message and log event when app isn't using AndroidX #42548

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

Merged
merged 3 commits into from
Oct 13, 2019

Conversation

blasten
Copy link

@blasten blasten commented Oct 11, 2019

Description

I added the new migration guide: https://flutter.dev/docs/development/androidx-migration.

Now, the tool can start printing a message and logging events when app isn't using AndroidX.

Screen Shot 2019-10-11 at 1 31 04 PM

Tests

I added the following tests:
Unit tests build_apk_test.dart and build_appbundle_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.

@fluttergithubbot fluttergithubbot added the tool Affects the "flutter" command-line tool. See also t: labels. label Oct 11, 2019
@blasten blasten requested a review from zanderso October 11, 2019 20:33
Copy link
Member

@zanderso zanderso left a comment

Choose a reason for hiding this comment

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

lgtm w/ nit

} else if (!usesAndroidX) {
BuildEvent('app-not-using-android-x').send();
printStatus('$exclamationMark Your app isn\'t using AndroidX.', emphasis: true);
printStatus(
Copy link
Member

Choose a reason for hiding this comment

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

I think the Flutter style guide says to do this like:

  printStatus(
    'To avoid potential build failures, you can quickly migrate your app '
    'by following the steps on https://goo.gl/CP92wY.',
    indent: 4,
  );

@codecov
Copy link

codecov bot commented Oct 11, 2019

Codecov Report

Merging #42548 into master will decrease coverage by 0.94%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #42548      +/-   ##
==========================================
- Coverage   60.29%   59.35%   -0.95%     
==========================================
  Files         194      194              
  Lines       18871    18859      -12     
==========================================
- Hits        11379    11194     -185     
- Misses       7492     7665     +173
Flag Coverage Δ
#flutter_tool 59.35% <100%> (-0.95%) ⬇️
Impacted Files Coverage Δ
packages/flutter_tools/lib/src/android/gradle.dart 77.67% <100%> (-0.78%) ⬇️
...kages/flutter_tools/lib/src/commands/generate.dart 20% <0%> (-65.19%) ⬇️
packages/flutter_tools/lib/src/project.dart 60.8% <0%> (-27.17%) ⬇️
packages/flutter_tools/lib/src/ios/mac.dart 31.66% <0%> (-22.58%) ⬇️
.../flutter_tools/lib/src/windows/windows_device.dart 28.57% <0%> (-11.43%) ⬇️
packages/flutter_tools/lib/src/plugins.dart 80.26% <0%> (-10.09%) ⬇️
packages/flutter_tools/lib/src/mdns_discovery.dart 77.77% <0%> (-6.35%) ⬇️
.../flutter_tools/lib/src/android/android_studio.dart 50% <0%> (-4.55%) ⬇️
...ckages/flutter_tools/lib/src/base/file_system.dart 64.81% <0%> (-3.71%) ⬇️
packages/flutter_tools/lib/src/ios/xcodeproj.dart 86.85% <0%> (-2.86%) ⬇️
... and 19 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 e761607...2f3ebea. Read the comment docs.

@blasten blasten merged commit 532a8fe into flutter:master Oct 13, 2019
@blasten blasten deleted the androidx_warning branch October 13, 2019 01:58
Inconnu08 pushed a commit to Inconnu08/flutter that referenced this pull request Nov 26, 2019
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 3, 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