Skip to content

fix(android): set Pigeon Kotlin package for AGP 8 / Kotlin 2.2+ - #144

Merged
diegotori merged 1 commit into
fluttercommunity:mainfrom
BriceFab:fix/android-pigeon-kotlin-package
Aug 31, 2026
Merged

fix(android): set Pigeon Kotlin package for AGP 8 / Kotlin 2.2+#144
diegotori merged 1 commit into
fluttercommunity:mainfrom
BriceFab:fix/android-pigeon-kotlin-package

Conversation

@BriceFab

@BriceFab BriceFab commented Aug 4, 2026

Copy link
Copy Markdown

Summary

  • Set Pigeon KotlinOptions.package to dev.fluttercommunity.plus.wakelock so generated Android API types are not left in the default package.
  • Update generated WakelockPlusMessages.g.kt and drop obsolete default-package imports from WakelockPlusPlugin.kt / Wakelock.kt.
  • Fixes Android builds on AGP 8 with Kotlin 2.2+ where GeneratedPluginRegistrant fails with cannot find symbol: class WakelockPlusPlugin.

Fixes #143
Closes #141

Test plan

  • Android assembleDebug / assembleDevDebug on AGP 8.x + Kotlin 2.2+/2.3 with wakelock_plus from this branch
  • Confirm WakelockPlusPlugin compiles and is registered
  • Optional: regenerate Pigeon outputs and confirm package remains set

Kotlin rejects default-package imports into a named package, so
WakelockPlusPlugin failed to compile and GeneratedPluginRegistrant
reported cannot find symbol. Point Pigeon KotlinOptions.package at
dev.fluttercommunity.plus.wakelock and drop obsolete imports.
@dklenowski

Copy link
Copy Markdown

thanks! fixed my app.

@diegotori diegotori left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM.

@diegotori
diegotori merged commit 446d2dd into fluttercommunity:main Aug 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants