Repository navigation
build(android): support AGP 9.5.1, Gradle 9.9.0 and Kotlin 2.4.21 - #4
Merged
Merged
Conversation
- protobuf-gradle-plugin 0.9.4 -> 0.10.1 (AGP 9 support; fixes 'ProtoSourceSet with name debug not found' on AGP 9.2+) - AGP 9.1.0 -> 9.5.1, Kotlin 2.4.10 -> 2.4.21 - android-junit5 1.11.2.0 -> 2.0.2 (plugin id is now de.mannodermaus.android-junit; 1.x uses the legacy variant API) - detekt 1.23.0 -> 1.23.8 (1.23.0 fails on JDK 21); use source instead of the deprecated input property - use '=' assignment in build.gradle (Gradle 10 deprecation) - wrap a lambda parameter list flagged by detekt-formatting 1.23.8 - example: AGP 9.5.1, Kotlin 2.4.21, Gradle 9.9.0, builtInKotlin=true Co-authored-by: dballance <1234523+dballance@users.noreply.github.com>
Co-authored-by: dballance <1234523+dballance@users.noreply.github.com>
Flutter 3.44's Gradle plugin applies kotlin-android to plugin projects, which AGP 9 rejects when android.builtInKotlin=true. 3.47.9 does not.
dballance
approved these changes
Nov 9, 2026
dballance
marked this pull request as ready for review
November 9, 2026 21:18
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull request opened by mashbill for dballance from a mashbill Session.
Why
On AGP 9.2 and later, apps fail while they configure
:reactive_ble_mobilewithProtoSourceSet with name 'debug' not found. The cause isprotobuf-gradle-plugin:0.9.4on the plugin's buildscript classpath, because it hooks the legacy variant API. Shine works around this today withid "com.google.protobuf" version "0.10.1" apply falsein its settings.gradle. Once this PR is merged, Shine can drop that workaround.Changes
packages/reactive_ble_mobile/android/build.gradle:Configuration.setVisiblecalls that Gradle 9.8 deprecates. Neither release changes the DSL used here (protobuf {}orandroid.sourceSets.main.proto).kotlin-androidis not applied, so built-in Kotlin works.de.mannodermaus.android-junit.Invalid value (21) passed to --jvm-target. The deprecatedinputproperty becomessource.=assignment, because the space-assignment form is deprecated and will be removed in Gradle 10.ReactiveBleClient.kt: I wrapped one lambda-type parameter list that detekt-formatting 1.23.8 flags (ParameterListWrapping). This is formatting only, with no behaviour change.example/android: AGP 9.5.1, Kotlin 2.4.21, Gradle wrapper 9.3.1 → 9.9.0, andandroid.builtInKotlin=true.The Dart API and the protobuf schema are unchanged.
Verification
Run locally on Flutter 3.47.9 and OpenJDK 21:
flutter build apk --debuginexample/succeeds../gradlew :reactive_ble_mobile:testDebugUnitTestpasses: 66 tests, 0 failures../gradlew :reactive_ble_mobile:detektpasses.generated/java/generateDebugProto/.../ProtobufModel.java) and compiled intoProtobufModel$*.class.Notes
.github/workflows/main.yml) still pins Flutter 3.44.0. The GitHub App can't change workflow files, so someone has to bump it to 3.47.9 separately.android.newDsl=true, the example fails inside Flutter's ownflutter-gradle-plugin(ClassCastException toAbstractAppExtension). This doesn't come from this plugin, so the example keepsnewDsl=false.