Skip to content

[quick_actions] Switch to Kotlin Pigeon#11507

Merged
auto-submit[bot] merged 3 commits intoflutter:mainfrom
stuartmorgan-g:kotlin-pigeon-quick-actions
Apr 29, 2026
Merged

[quick_actions] Switch to Kotlin Pigeon#11507
auto-submit[bot] merged 3 commits intoflutter:mainfrom
stuartmorgan-g:kotlin-pigeon-quick-actions

Conversation

@stuartmorgan-g
Copy link
Copy Markdown
Collaborator

Replaces the Java Pigeon generator with the Kotlin Pigeon generator, and adjusts the project accordingly:

  • Adds Kotlin build setings to Gradle.
  • Updates API signatures for Kotlin/Java differences.
  • Adds generic Java/Kotlin compat shim to create Result objects from Java, since those haven't been added to the Pigeon generator yet.

Part of flutter/flutter#158287

Pre-Review Checklist

Footnotes

  1. Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling. 2

@stuartmorgan-g stuartmorgan-g requested a review from jesswrd April 14, 2026 19:40
@stuartmorgan-g stuartmorgan-g added the triage-android Should be looked at in Android triage label Apr 14, 2026
@flutter-dashboard
Copy link
Copy Markdown

It looks like this pull request may not have tests. Please make sure to add tests or get an explicit test exemption before merging.

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. If you believe this PR qualifies for a test exemption, contact "@test-exemption-reviewer" in the #hackers channel in Discord (don't just cc them here, they won't see it!). The test exemption team is a small volunteer group, so all reviewers should feel empowered to ask for tests, without delegating that responsibility entirely to the test exemption group.

@stuartmorgan-g
Copy link
Copy Markdown
Collaborator Author

test-exempt: code refactor with no semantic change

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request migrates the quick_actions_android package to use Kotlin Pigeon for its internal implementation. The changes involve updating the build configuration to support Kotlin, replacing Java-generated Pigeon files with Kotlin versions, and refactoring the Android plugin implementation to align with the new API. Feedback points out an invalid Kotlin version in the build script and an unsafe unchecked cast in the utility code.

companion object {
@JvmStatic
fun <T> success(value: T, callback: Any) {
val castedCallback: (Result<T>) -> Unit = callback as (Result<T>) -> Unit
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

This unchecked cast from Any to a functional type is unsafe and could lead to a ClassCastException at runtime. Furthermore, the success method (lines 24-27) appears to be unused in this pull request. Consider removing unused code to keep the shim minimal.

import java.io.ByteArrayOutputStream
import java.nio.ByteBuffer

private object MessagesPigeonUtils {
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.

FWIW I think these utils are weird when we have a ResultUtils class and it hides the data classes you came to this class to read.

Out of scope for this pr though.

@github-actions github-actions Bot removed the CICD Run CI/CD label Apr 29, 2026
@stuartmorgan-g stuartmorgan-g added autosubmit Merge PR when tree becomes green via auto submit App CICD Run CI/CD labels Apr 29, 2026
@auto-submit auto-submit Bot merged commit c05ab81 into flutter:main Apr 29, 2026
83 checks passed
Mairramer pushed a commit to Mairramer/flutter that referenced this pull request Apr 29, 2026
…er#185748)

flutter/packages@ba80f8f...cde5b36

2026-04-29 stuartmorgan@google.com [file_selector] Switch to Kotlin
Pigeon (flutter/packages#11479)
2026-04-29 stuartmorgan@google.com [image_picker] Switch to Kotlin
Pigeon (flutter/packages#11504)
2026-04-29 stuartmorgan@google.com [quick_actions] Switch to Kotlin
Pigeon (flutter/packages#11507)
2026-04-29 git@reb0.org [pigeon] fix: Apply correct ThrowError success
callback (flutter/packages#11585)
2026-04-29 nateshmbhat1@gmail.com [video_player_platform_interface] Add
video track selection support (flutter/packages#11474)
2026-04-29 katelovett@google.com Update git ignore for
personal/iterating on agent skills and rules (flutter/packages#11600)
2026-04-29 stuartmorgan@google.com [file_selector] Update Windows
example for deprecations (flutter/packages#11570)
2026-04-29 git@reb0.org [various] Upgrade googletest to v1.15.2
(flutter/packages#11586)
2026-04-28 engine-flutter-autoroll@skia.org Roll Flutter (stable) from
cc0734a to 02085fe (2 revisions) (flutter/packages#11598)
2026-04-28 116356835+AbdeMohlbi@users.noreply.github.com [image_picker]
Update documentation of maxDuration to reflect that it only applies to
recording (flutter/packages#11417)
2026-04-28 suojae3@gmail.com [vector_graphics] add imageBuilder property
to VectorGraphic (flutter/packages#11094)
2026-04-28 engine-flutter-autoroll@skia.org Roll Flutter from
61fca76 to 81bc3d6 (1 revision) (flutter/packages#11597)

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-flutter-autoroll
Please CC flutter-ecosystem@google.com on the revert to ensure that a
human
is aware of the problem.

To file a bug in Flutter:
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 CICD Run CI/CD p: quick_actions platform-android triage-android Should be looked at in Android triage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants