Version
wakelock_plus 1.7.0 (regression vs 1.6.1). Introduced by #135 / PR #136.
Environment
- Flutter 3.44.6, Kotlin Gradle Plugin 2.2.20, AGP 8.11.1 (NOT on AGP 9 / built-in Kotlin)
Symptom
Android build fails in GeneratedPluginRegistrant.java:
error: cannot find symbol
...add(new dev.fluttercommunity.plus.wakelock.WakelockPlusPlugin());
symbol: class WakelockPlusPlugin
WakelockPlusPlugin.class is never produced. Wakelock.class compiles fine.
Root cause
android/.../WakelockPlusMessages.g.kt has no package declaration, so its Pigeon classes land in the default package. WakelockPlusPlugin.kt (package dev.fluttercommunity.plus.wakelock) then does:
import IsEnabledMessage
import ToggleMessage
import WakelockPlusApi
Importing from the default package into a named package is rejected by modern Kotlin, so only WakelockPlusPlugin.kt (the file with these imports) fails to compile — which is why the class disappears.
Before #136 this was masked: the plugin shipped its own buildscript pinning Kotlin 2.2.0, which tolerated the default-package import. #136 removed that buildscript so the plugin is now compiled by the app's KGP (2.2.20), which rejects it. On AGP < 9 (no built-in Kotlin) this breaks the build.
Version
wakelock_plus 1.7.0 (regression vs 1.6.1). Introduced by #135 / PR #136.
Environment
Symptom
Android build fails in GeneratedPluginRegistrant.java:
WakelockPlusPlugin.classis never produced.Wakelock.classcompiles fine.Root cause
android/.../WakelockPlusMessages.g.kthas nopackagedeclaration, so its Pigeon classes land in the default package.WakelockPlusPlugin.kt(packagedev.fluttercommunity.plus.wakelock) then does:Importing from the default package into a named package is rejected by modern Kotlin, so only
WakelockPlusPlugin.kt(the file with these imports) fails to compile — which is why the class disappears.Before #136 this was masked: the plugin shipped its own
buildscriptpinning Kotlin 2.2.0, which tolerated the default-package import. #136 removed that buildscript so the plugin is now compiled by the app's KGP (2.2.20), which rejects it. On AGP < 9 (no built-in Kotlin) this breaks the build.