Skip to content

Conversation

@lamnhan066
Copy link
Contributor

@lamnhan066 lamnhan066 commented Apr 20, 2024

In the examples/api, the Android platform missed this step while migrating to the declarative plugins {} block described in flutter-gradle-plugin-apply, so all examples of examples/api cannot run.

Fixes #147100

If you had to change anything in the flutter/tests repo, include a link to the migration guide as per the breaking change policy.

Pre-launch Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact "@test-exemption-reviewer" in the #hackers channel in Chat (don't just cc them here, they won't see it! Use Discord!).

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

@google-cla
Copy link

google-cla bot commented Apr 20, 2024

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@github-actions github-actions bot added framework flutter/packages/flutter repository. See also f: labels. d: api docs Issues with https://api.flutter.dev/ d: examples Sample code and demos labels Apr 20, 2024
@Hixie
Copy link
Contributor

Hixie commented Apr 21, 2024

Are these just regenerated from the flutter create template?

@lamnhan066
Copy link
Contributor Author

lamnhan066 commented Apr 21, 2024

@Hixie No, I removed the kotlin_version manually, then I took a look at my new project and saw that we need to move the dev.flutter.flutter-gradle-plugin to the bottom so I have done it too.

Copy link
Member

@bartekpacia bartekpacia left a comment

Choose a reason for hiding this comment

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

good catch, lgtm

@reidbaker
Copy link
Contributor

Following the example in the readme I confirmed that tip of tree fails flutter run -d SOMEANDORIDDEVICE lib/services/system_chrome/system_chrome.set_system_u_i_overlay_style.1.dart
with the changes the app compiles and runs correctly.

I am worried that this was not caught in any testing.

flutter test from the examples/api directory flaked on an unrelated test and a rereun had everything pass.

From what I can tell Linux framework_tests_misc is one of several tests that should execute this new test but I dont see it in your last run. https://ci.chromium.org/ui/p/flutter/builders/try/Linux%20framework_tests_misc/58955/overview

Copy link
Contributor

@reidbaker reidbaker left a comment

Choose a reason for hiding this comment

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

Hold on understanding what it takes to make your new test run in ci.

@lamnhan066

This comment was marked as outdated.

@reidbaker
Copy link
Contributor

reidbaker commented Apr 22, 2024

I just talked to some coworkers and the example API docs that use this code do not use the android or iOS sub directories which is why they were not tested. It turns out the correct fix is to delete the api/android and api/ios sub directories and add them to the local .gitignore.

Do you want to update this pr to delete the directories or do you want to close this pr and have someone from the flutter team delete the code?

@lamnhan066
Copy link
Contributor Author

@reidbaker What should I do with the other platforms or do I just need to remove android and ios subdirectories?

@reidbaker
Copy link
Contributor

@reidbaker What should I do with the other platforms or do I just need to remove android and ios subdirectories?

You dont need to do anything other than delete android and ios and add those directories to gitignore to prevent them from being re-added accidentally.

Quote from a teammate below.
"our API docs we only use the dart code in examples/api/lib and run that code in an embedded dartpad. The platform directories are "unused" as far as I know. They are handy for local development of new samples (so you can just flutter run -d macos them). But for that just having support for desktop platforms is sufficient (hence the smoke test that only covers those platforms)."

@github-actions github-actions bot added a: tests "flutter test", flutter_test, or one of our tests a: text input Entering text in a text field or keyboard related problems tool Affects the "flutter" command-line tool. See also t: labels. f: material design flutter/packages/flutter/material repository. f: routes Navigator, Router, and related APIs. labels Apr 22, 2024
@lamnhan066 lamnhan066 force-pushed the update-android-platform-in-api-example branch from 3d91ce6 to 015efcf Compare April 22, 2024 18:22
@github-actions github-actions bot removed a: tests "flutter test", flutter_test, or one of our tests a: text input Entering text in a text field or keyboard related problems tool Affects the "flutter" command-line tool. See also t: labels. f: material design flutter/packages/flutter/material repository. f: routes Navigator, Router, and related APIs. labels Apr 22, 2024
@lamnhan066
Copy link
Contributor Author

@reidbaker Done. Please give it a look.

@lamnhan066
Copy link
Contributor Author

Done

Copy link
Contributor

@reidbaker reidbaker left a comment

Choose a reason for hiding this comment

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

Thank you contributing to flutter!

@reidbaker reidbaker added the autosubmit Merge PR when tree becomes green via auto submit App label Apr 22, 2024
@reidbaker
Copy link
Contributor

I have added the autosubmit label. Once the tree is green a bot will merge this pr.

@auto-submit auto-submit bot merged commit bd65134 into flutter:master Apr 22, 2024
gilnobrega pushed a commit to gilnobrega/flutter that referenced this pull request Apr 22, 2024
In the `examples/api`, the Android platform missed this step while migrating to the declarative plugins {} block described in [flutter-gradle-plugin-apply](https://docs.flutter.dev/release/breaking-changes/flutter-gradle-plugin-apply), so all examples of `examples/api` cannot run.

Fixes flutter#147100

*If you had to change anything in the [flutter/tests] repo, include a link to the migration guide as per the [breaking change policy].*
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 23, 2024
auto-submit bot pushed a commit to flutter/packages that referenced this pull request Apr 23, 2024
flutter/flutter@140edb9...77043ba

2024-04-23 [email protected] Roll Flutter Engine from ffd3911b1ff7 to 79f49954cce8 (2 revisions) (flutter/flutter#147235)
2024-04-23 [email protected] Roll Flutter Engine from c7d9deb66bf7 to ffd3911b1ff7 (1 revision) (flutter/flutter#147227)
2024-04-23 [email protected] Roll pub packages (flutter/flutter#147220)
2024-04-23 [email protected] Roll Flutter Engine from 075d834489d0 to c7d9deb66bf7 (2 revisions) (flutter/flutter#147215)
2024-04-23 [email protected] Mention visualDensity impact on ButtonStyle.padding documentation (flutter/flutter#147048)
2024-04-23 [email protected] Roll Flutter Engine from 9c0d24ff1cb6 to 075d834489d0 (1 revision) (flutter/flutter#147214)
2024-04-23 [email protected] Fix memory leaks in `CupertinoTextMagnifier` (flutter/flutter#147208)
2024-04-23 [email protected] Roll Flutter Engine from 004e98839ed7 to 9c0d24ff1cb6 (1 revision) (flutter/flutter#147211)
2024-04-23 [email protected] Roll Flutter Engine from 79f753650c6e to 004e98839ed7 (1 revision) (flutter/flutter#147209)
2024-04-23 [email protected] Roll Flutter Engine from f8e373da5227 to 79f753650c6e (1 revision) (flutter/flutter#147206)
2024-04-23 [email protected] fixes cupertino page transition leak (flutter/flutter#147133)
2024-04-23 [email protected] Fix memory leaks in `PopupMenu` (flutter/flutter#147174)
2024-04-23 [email protected] Roll Flutter Engine from 62c9f17169cf to f8e373da5227 (2 revisions) (flutter/flutter#147205)
2024-04-23 [email protected] Roll Flutter Engine from 33c828fb3ff5 to 62c9f17169cf (4 revisions) (flutter/flutter#147203)
2024-04-23 49699333+dependabot[bot]@users.noreply.github.com Bump actions/upload-artifact from 4.3.2 to 4.3.3 (flutter/flutter#147192)
2024-04-23 49699333+dependabot[bot]@users.noreply.github.com Bump github/codeql-action from 3.25.1 to 3.25.2 (flutter/flutter#147193)
2024-04-23 [email protected] Roll Flutter Engine from a4b71f02a1c7 to 33c828fb3ff5 (9 revisions) (flutter/flutter#147190)
2024-04-22 [email protected] Roll pub packages (flutter/flutter#147094)
2024-04-22 [email protected] Re-land fix for not disposed TabController (flutter/flutter#146745)
2024-04-22 [email protected] Roll Flutter Engine from 75ca2195c936 to a4b71f02a1c7 (1 revision) (flutter/flutter#147175)
2024-04-22 [email protected] Update `examples/api` for android platform (flutter/flutter#147102)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages
Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
TecHaxter pushed a commit to TecHaxter/flutter_packages that referenced this pull request May 22, 2024
flutter/flutter@140edb9...77043ba

2024-04-23 [email protected] Roll Flutter Engine from ffd3911b1ff7 to 79f49954cce8 (2 revisions) (flutter/flutter#147235)
2024-04-23 [email protected] Roll Flutter Engine from c7d9deb66bf7 to ffd3911b1ff7 (1 revision) (flutter/flutter#147227)
2024-04-23 [email protected] Roll pub packages (flutter/flutter#147220)
2024-04-23 [email protected] Roll Flutter Engine from 075d834489d0 to c7d9deb66bf7 (2 revisions) (flutter/flutter#147215)
2024-04-23 [email protected] Mention visualDensity impact on ButtonStyle.padding documentation (flutter/flutter#147048)
2024-04-23 [email protected] Roll Flutter Engine from 9c0d24ff1cb6 to 075d834489d0 (1 revision) (flutter/flutter#147214)
2024-04-23 [email protected] Fix memory leaks in `CupertinoTextMagnifier` (flutter/flutter#147208)
2024-04-23 [email protected] Roll Flutter Engine from 004e98839ed7 to 9c0d24ff1cb6 (1 revision) (flutter/flutter#147211)
2024-04-23 [email protected] Roll Flutter Engine from 79f753650c6e to 004e98839ed7 (1 revision) (flutter/flutter#147209)
2024-04-23 [email protected] Roll Flutter Engine from f8e373da5227 to 79f753650c6e (1 revision) (flutter/flutter#147206)
2024-04-23 [email protected] fixes cupertino page transition leak (flutter/flutter#147133)
2024-04-23 [email protected] Fix memory leaks in `PopupMenu` (flutter/flutter#147174)
2024-04-23 [email protected] Roll Flutter Engine from 62c9f17169cf to f8e373da5227 (2 revisions) (flutter/flutter#147205)
2024-04-23 [email protected] Roll Flutter Engine from 33c828fb3ff5 to 62c9f17169cf (4 revisions) (flutter/flutter#147203)
2024-04-23 49699333+dependabot[bot]@users.noreply.github.com Bump actions/upload-artifact from 4.3.2 to 4.3.3 (flutter/flutter#147192)
2024-04-23 49699333+dependabot[bot]@users.noreply.github.com Bump github/codeql-action from 3.25.1 to 3.25.2 (flutter/flutter#147193)
2024-04-23 [email protected] Roll Flutter Engine from a4b71f02a1c7 to 33c828fb3ff5 (9 revisions) (flutter/flutter#147190)
2024-04-22 [email protected] Roll pub packages (flutter/flutter#147094)
2024-04-22 [email protected] Re-land fix for not disposed TabController (flutter/flutter#146745)
2024-04-22 [email protected] Roll Flutter Engine from 75ca2195c936 to a4b71f02a1c7 (1 revision) (flutter/flutter#147175)
2024-04-22 [email protected] Update `examples/api` for android platform (flutter/flutter#147102)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages
Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmit Merge PR when tree becomes green via auto submit App d: api docs Issues with https://api.flutter.dev/ d: examples Sample code and demos framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Examples in examples/api cannot run because of a missed step while migrating to the declarative plugins {} block

4 participants