Environment
- flutter_boost version: 5.0.2
- Flutter version: 3.35.0+ (Kotlin-based Gradle plugin)
- Gradle version: 9.2.0
- AGP version: 8.10.1 / 9.0.0
- OS: macOS
Description
When using Gradle 9.x (which bundles Groovy 4 and Kotlin 2.2), the project fails to configure the :flutter_boost module with a NullPointerException:
A problem occurred configuring project ':flutter_boost'.
Failed to notify project evaluation listener.
java.lang.NullPointerException (no error message)
at com.flutter.gradle.FlutterPluginUtils.getAndroidExtension$gradle(FlutterPluginUtils.kt:391)
at com.flutter.gradle.FlutterPluginUtils.getCompileSdkFromProject(FlutterPluginUtils.kt:405)
at com.flutter.gradle.plugins.PluginHandler$Companion$configurePluginProject$2.execute(PluginHandler.kt:143)
Root Cause
Flutter 3.32+ converted the Gradle plugin from Groovy to Kotlin. The new PluginHandler tries to call getAndroidExtension() on the flutter_boost plugin project during afterEvaluate, but the Android extension is null at that point — likely because flutter_boost's build.gradle does not apply the Android library plugin in a way that is compatible with the new Flutter Kotlin Gradle plugin's evaluation order.
Expected Behavior
flutter_boost should be compatible with:
- Gradle 9.x (Groovy 4, Kotlin 2.2)
- Flutter 3.32+ (Kotlin-based Gradle plugin)
- AGP 9.x (new DSL)
Workaround
Currently the only workaround is to downgrade to:
- Flutter ≤ 3.29.x (Groovy-based Gradle plugin)
- Gradle 8.x (Groovy 3)
Related
Environment
Description
When using Gradle 9.x (which bundles Groovy 4 and Kotlin 2.2), the project fails to configure the
:flutter_boostmodule with aNullPointerException:A problem occurred configuring project ':flutter_boost'.
Root Cause
Flutter 3.32+ converted the Gradle plugin from Groovy to Kotlin. The new
PluginHandlertries to callgetAndroidExtension()on theflutter_boostplugin project duringafterEvaluate, but the Android extension is null at that point — likely becauseflutter_boost'sbuild.gradledoes not apply the Android library plugin in a way that is compatible with the new Flutter Kotlin Gradle plugin's evaluation order.Expected Behavior
flutter_boostshould be compatible with:Workaround
Currently the only workaround is to downgrade to:
Related