Skip to content

Conversation

@camsim99
Copy link
Contributor

@camsim99 camsim99 commented Jan 8, 2025

Revises #158026 to fix #160407.

Makes a number of fixes:

  • Fixes Groovy logic that attempted to remove dev dependencies from release builds to use <buildType>Api versus api and loop to configure the project dependencies per build type
  • Adds back dependency on embedding to plugin projects since this is needed regardless (the plugin may not be included in a particularly typed build but it still needs it for where it's included)
  • Fixes integration test to throw and error upon failure, check right APK for the release build it's testing, and configure the flag need for .flutter-plugin-dependencies to mark plugins as dev dependencies as expected
  • Uses @matanlurey's patch to remove dev dependency from the GeneratedPluginRegistrant in release mode

Pre-launch Checklist

@github-actions github-actions bot added platform-android Android applications specifically tool Affects the "flutter" command-line tool. See also t: labels. labels Jan 8, 2025
@camsim99 camsim99 requested a review from matanlurey January 8, 2025 23:32
profile {
initWith(debug)
if (it.hasProperty("matchingFallbacks")) {
matchingFallbacks = ["debug", "release"]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not 100% confident on this. TLDR is that the profile mode has to exist in order for us to specify profileApi, but typically it's defined after this method is called. I added it redundantly here to make sure it exists before. I left the other one because I assume it needs it for the case where there are no plugins, but I'll double check.

Copy link
Contributor

Choose a reason for hiding this comment

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

If you intend to double check before submitting, ACK, otherwise let's add a TODO/GH issue as well before submitting.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oh ack! I checked. I think based on how other things are written in the plugin, this should be fine.

Copy link
Contributor Author

@camsim99 camsim99 Jan 9, 2025

Choose a reason for hiding this comment

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

Had an idea to slightly clean this up so gonna do that before this lands. I'll also cleanup the logic below.

Copy link
Contributor

@matanlurey matanlurey left a comment

Choose a reason for hiding this comment

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

In general looks good, one required change and one change or TODO, your choice.

Copy link
Contributor

@matanlurey matanlurey left a comment

Choose a reason for hiding this comment

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

LGTM, 1 more question that can be ACK'd or TODOd.

profile {
initWith(debug)
if (it.hasProperty("matchingFallbacks")) {
matchingFallbacks = ["debug", "release"]
Copy link
Contributor

Choose a reason for hiding this comment

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

If you intend to double check before submitting, ACK, otherwise let's add a TODO/GH issue as well before submitting.

@camsim99 camsim99 added the autosubmit Merge PR when tree becomes green via auto submit App label Jan 9, 2025
@auto-submit
Copy link
Contributor

auto-submit bot commented Jan 9, 2025

auto label is removed for flutter/flutter/161343, due to - The status or check suite Linux mac_android_aot_engine has failed. Please fix the issues identified (or deflake) before re-applying this label.

  • The status or check suite Merge Queue Guard has failed. Please fix the issues identified (or deflake) before re-applying this label.

@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Jan 9, 2025
@camsim99
Copy link
Contributor Author

camsim99 commented Jan 9, 2025

The Linux gradle_plugin_light_apk_tests is a legit failure that means this fix requires more work. We need to make sure the plugin dependency is added to for any custom build type a developer may specify to land this.

@matanlurey
Copy link
Contributor

We need to make sure the plugin dependency is added to for any custom build type a developer may specify to land this.

Can you expand on that? What is a "custom build type", you mean something other than debug/profile/release?

@camsim99
Copy link
Contributor Author

camsim99 commented Jan 9, 2025

Can you expand on that? What is a "custom build type", you mean something other than debug/profile/release?

Yeah. The test that is failing uses a custom local build type:

await runProjectTest((FlutterProject project) async {
section('gradlew assembleLocal with plugin (custom debug build)');
final Directory tempDir = Directory.systemTemp.createTempSync('flutter_plugin.');
final Directory pluginDir = Directory(path.join(tempDir.path, 'plugin_under_test'));
section('Create plugin');
await inDirectory(tempDir, () async {
await flutter(
'create',
options: <String>[
'--org',
'io.flutter.devicelab.plugin',
'--template=plugin',
'--platforms=android,ios',
pluginDir.path,
],
);
});
section('Configure');
await project.addPlugin('plugin_under_test', options: <String>['--path', pluginDir.path]);
await project.addCustomBuildType('local', initWith: 'debug');
await project.getPackages();
section('Build APK');
await project.runGradleTask('assembleLocal');
});

I believe what's happening is that we are not including the plugin dependency for the local build type. Though, the error doesn't immediately point to that:

e: file:///private/var/folders/v1/wpg85hbs16qd5b_x1c_l6nj400vh_3/T/flutter_devicelab_gradle_plugin_test.rIz5Zq/hello/android/app/src/main/kotlin/com/example/hello/MainActivity.kt:3:8 Unresolved reference: io
e: file:///private/var/folders/v1/wpg85hbs16qd5b_x1c_l6nj400vh_3/T/flutter_devicelab_gradle_plugin_test.rIz5Zq/hello/android/app/src/main/kotlin/com/example/hello/MainActivity.kt:5:22 Unresolved reference: FlutterActivity

@camsim99
Copy link
Contributor Author

I just tested my theory by including the plugin dependency for all build types and the test passed.

engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jan 16, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jan 16, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jan 16, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jan 16, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jan 16, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jan 16, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jan 16, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jan 16, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jan 16, 2025
auto-submit bot pushed a commit to flutter/packages that referenced this pull request Jan 16, 2025
flutter/flutter@40c2b86...5517cc9

2025-01-15 [email protected] feat: Change default value of keyboardDismissBehavior (flutter/flutter#158580)
2025-01-15 [email protected] Roll pub packages (flutter/flutter#161680)
2025-01-15 [email protected] Revert "Autocomplete Options Width" (flutter/flutter#161666)
2025-01-15 [email protected] Update two_dimensional_scrollables triage routing (flutter/flutter#161667)
2025-01-15 [email protected] [DisplayList] Migrate from SkRSXform to Impeller RSTransform (flutter/flutter#161652)
2025-01-15 [email protected] Roll Packages from d1fd623 to f73cb00 (2 revisions) (flutter/flutter#161672)
2025-01-15 [email protected] Fix DropdownMenu isCollapsed decoration does not Reduce height (flutter/flutter#161427)
2025-01-15 [email protected] Manual roll of Skia to e7b8d078851f (flutter/flutter#161609)
2025-01-15 [email protected] Fix `TabBar` glitchy elastic `Tab`  animation (flutter/flutter#161514)
2025-01-15 [email protected] Roll pub packages (flutter/flutter#161643)
2025-01-15 [email protected] Exclude the top-level `engine` directory from `generate_gradle_lockfiles`. (flutter/flutter#161635)
2025-01-15 [email protected] Roll pub packages (flutter/flutter#161632)
2025-01-15 [email protected] Refactor `android_engine_test`, make it easier to debug/deflake locally. (flutter/flutter#161534)
2025-01-15 [email protected] [Impeller] null check device buffer in image encoding. (flutter/flutter#161194)
2025-01-15 [email protected] Feature/twitter keyboard (flutter/flutter#161025)
2025-01-15 [email protected] Fixed XiaoMi statusBar Bug (flutter/flutter#161271)
2025-01-15 [email protected] Clean up engine's analysis_options.yaml (flutter/flutter#161554)
2025-01-14 [email protected] Remove `gradle_deprecated_settings` test app, and remove reference from lockfile exclusion yaml (flutter/flutter#161622)
2025-01-14 [email protected] [deps] remove no-longer-used repo deps (flutter/flutter#161605)
2025-01-14 [email protected] [DisplayList] remove obsolete use of Skia goemetry objects in DL utils (flutter/flutter#161553)
2025-01-14 [email protected] [Engine] Support asymmetrical rounded superellipses (flutter/flutter#161409)
2025-01-14 [email protected] [SwiftPM] Make 'flutter build ios-framework' generate an empty Package.swift (flutter/flutter#161464)
2025-01-14 [email protected] [canvaskit] Fix GIF decode failure (flutter/flutter#161536)
2025-01-14 [email protected] [Impeller] fixes for AHB swapchains. (flutter/flutter#161562)
2025-01-14 [email protected] Last Engine<>Framework lint sync (flutter/flutter#161560)
2025-01-14 [email protected] Check that localization files of stocks app are up-to-date (flutter/flutter#161608)
2025-01-14 [email protected] [Android] Actually remove dev dependencies from release builds (flutter/flutter#161343)
2025-01-14 [email protected] Update package revisions to latest (flutter/flutter#161525)

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] 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
github-merge-queue bot pushed a commit that referenced this pull request Jan 30, 2025
…roid platforms (#161828)

Removes dev dependencies from the generated plugin registrants for all
platforms since they will be removed from release builds (this was
already done for Android, mostly in
#161343).

Fixes #161348.

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 12, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 13, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 13, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 6, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 7, 2025
androidseb pushed a commit to androidseb/packages that referenced this pull request Jun 8, 2025
flutter/flutter@40c2b86...5517cc9

2025-01-15 [email protected] feat: Change default value of keyboardDismissBehavior (flutter/flutter#158580)
2025-01-15 [email protected] Roll pub packages (flutter/flutter#161680)
2025-01-15 [email protected] Revert "Autocomplete Options Width" (flutter/flutter#161666)
2025-01-15 [email protected] Update two_dimensional_scrollables triage routing (flutter/flutter#161667)
2025-01-15 [email protected] [DisplayList] Migrate from SkRSXform to Impeller RSTransform (flutter/flutter#161652)
2025-01-15 [email protected] Roll Packages from d1fd623 to f73cb00 (2 revisions) (flutter/flutter#161672)
2025-01-15 [email protected] Fix DropdownMenu isCollapsed decoration does not Reduce height (flutter/flutter#161427)
2025-01-15 [email protected] Manual roll of Skia to e7b8d078851f (flutter/flutter#161609)
2025-01-15 [email protected] Fix `TabBar` glitchy elastic `Tab`  animation (flutter/flutter#161514)
2025-01-15 [email protected] Roll pub packages (flutter/flutter#161643)
2025-01-15 [email protected] Exclude the top-level `engine` directory from `generate_gradle_lockfiles`. (flutter/flutter#161635)
2025-01-15 [email protected] Roll pub packages (flutter/flutter#161632)
2025-01-15 [email protected] Refactor `android_engine_test`, make it easier to debug/deflake locally. (flutter/flutter#161534)
2025-01-15 [email protected] [Impeller] null check device buffer in image encoding. (flutter/flutter#161194)
2025-01-15 [email protected] Feature/twitter keyboard (flutter/flutter#161025)
2025-01-15 [email protected] Fixed XiaoMi statusBar Bug (flutter/flutter#161271)
2025-01-15 [email protected] Clean up engine's analysis_options.yaml (flutter/flutter#161554)
2025-01-14 [email protected] Remove `gradle_deprecated_settings` test app, and remove reference from lockfile exclusion yaml (flutter/flutter#161622)
2025-01-14 [email protected] [deps] remove no-longer-used repo deps (flutter/flutter#161605)
2025-01-14 [email protected] [DisplayList] remove obsolete use of Skia goemetry objects in DL utils (flutter/flutter#161553)
2025-01-14 [email protected] [Engine] Support asymmetrical rounded superellipses (flutter/flutter#161409)
2025-01-14 [email protected] [SwiftPM] Make 'flutter build ios-framework' generate an empty Package.swift (flutter/flutter#161464)
2025-01-14 [email protected] [canvaskit] Fix GIF decode failure (flutter/flutter#161536)
2025-01-14 [email protected] [Impeller] fixes for AHB swapchains. (flutter/flutter#161562)
2025-01-14 [email protected] Last Engine<>Framework lint sync (flutter/flutter#161560)
2025-01-14 [email protected] Check that localization files of stocks app are up-to-date (flutter/flutter#161608)
2025-01-14 [email protected] [Android] Actually remove dev dependencies from release builds (flutter/flutter#161343)
2025-01-14 [email protected] Update package revisions to latest (flutter/flutter#161525)

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] 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
FMorschel pushed a commit to FMorschel/packages that referenced this pull request Jun 9, 2025
flutter/flutter@40c2b86...5517cc9

2025-01-15 [email protected] feat: Change default value of keyboardDismissBehavior (flutter/flutter#158580)
2025-01-15 [email protected] Roll pub packages (flutter/flutter#161680)
2025-01-15 [email protected] Revert "Autocomplete Options Width" (flutter/flutter#161666)
2025-01-15 [email protected] Update two_dimensional_scrollables triage routing (flutter/flutter#161667)
2025-01-15 [email protected] [DisplayList] Migrate from SkRSXform to Impeller RSTransform (flutter/flutter#161652)
2025-01-15 [email protected] Roll Packages from d1fd623 to f73cb00 (2 revisions) (flutter/flutter#161672)
2025-01-15 [email protected] Fix DropdownMenu isCollapsed decoration does not Reduce height (flutter/flutter#161427)
2025-01-15 [email protected] Manual roll of Skia to e7b8d078851f (flutter/flutter#161609)
2025-01-15 [email protected] Fix `TabBar` glitchy elastic `Tab`  animation (flutter/flutter#161514)
2025-01-15 [email protected] Roll pub packages (flutter/flutter#161643)
2025-01-15 [email protected] Exclude the top-level `engine` directory from `generate_gradle_lockfiles`. (flutter/flutter#161635)
2025-01-15 [email protected] Roll pub packages (flutter/flutter#161632)
2025-01-15 [email protected] Refactor `android_engine_test`, make it easier to debug/deflake locally. (flutter/flutter#161534)
2025-01-15 [email protected] [Impeller] null check device buffer in image encoding. (flutter/flutter#161194)
2025-01-15 [email protected] Feature/twitter keyboard (flutter/flutter#161025)
2025-01-15 [email protected] Fixed XiaoMi statusBar Bug (flutter/flutter#161271)
2025-01-15 [email protected] Clean up engine's analysis_options.yaml (flutter/flutter#161554)
2025-01-14 [email protected] Remove `gradle_deprecated_settings` test app, and remove reference from lockfile exclusion yaml (flutter/flutter#161622)
2025-01-14 [email protected] [deps] remove no-longer-used repo deps (flutter/flutter#161605)
2025-01-14 [email protected] [DisplayList] remove obsolete use of Skia goemetry objects in DL utils (flutter/flutter#161553)
2025-01-14 [email protected] [Engine] Support asymmetrical rounded superellipses (flutter/flutter#161409)
2025-01-14 [email protected] [SwiftPM] Make 'flutter build ios-framework' generate an empty Package.swift (flutter/flutter#161464)
2025-01-14 [email protected] [canvaskit] Fix GIF decode failure (flutter/flutter#161536)
2025-01-14 [email protected] [Impeller] fixes for AHB swapchains. (flutter/flutter#161562)
2025-01-14 [email protected] Last Engine<>Framework lint sync (flutter/flutter#161560)
2025-01-14 [email protected] Check that localization files of stocks app are up-to-date (flutter/flutter#161608)
2025-01-14 [email protected] [Android] Actually remove dev dependencies from release builds (flutter/flutter#161343)
2025-01-14 [email protected] Update package revisions to latest (flutter/flutter#161525)

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] 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

platform-android Android applications specifically tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

flutter config --explicit-package-dependencies breaks flutter build apk

2 participants