Skip to content

feat: modernize Android build toolchain#271

Open
jokerttu wants to merge 2 commits into
mainfrom
feat/modernize-android-build-toolchain
Open

feat: modernize Android build toolchain#271
jokerttu wants to merge 2 commits into
mainfrom
feat/modernize-android-build-toolchain

Conversation

@jokerttu
Copy link
Copy Markdown
Collaborator

@jokerttu jokerttu commented Jun 4, 2026

Ports the Android build modernization from flutter-navigation-sdk#711 to the driver SDK.

  • Convert the plugin's android/build.gradle + settings.gradle to Kotlin DSL (.kts).
  • Plugin: apply KGP conditionally (only on AGP < 9). AGP 9+ ships built-in Kotlin, so applying KGP there is unnecessary and triggers a Flutter deprecation warning.
  • Replace deprecated kotlinOptions {} with kotlin { compilerOptions {} } in plugin and example.
  • Raise Java/Kotlin target 11 → 17 (matches Flutter templates and Navigation SDK requirement).
  • Bump example Gradle wrapper 8.13 → 8.14.3 and Kotlin (KGP) 2.1.0 → 2.3.20.
  • Gate the ktfmt formatter behind -Pktfmt (via melos run format:android) so it is never forced onto apps that depend on this plugin.

Driver-specific dependencies (transportation-driver:7.0.0, androidx.startup) are preserved; the navigation SDK's play-services-maps exclusion is intentionally not ported since the driver SDK never had it.

Verification

  • flutter build apk --config-only succeeds.
  • ./gradlew :google_driver_flutter:compileDebugKotlin builds on Gradle 8.14.3 / JVM target 17.
  • ./gradlew :google_driver_flutter:testDebugUnitTest passes (mockk + robolectric load under JVM 17).
  • Confirmed transportation-driver:7.0.0 resolves and pulls in navigation:7.6.0 transitively.

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I signed the CLA.
  • I updated/added relevant documentation
  • I added new tests to check the change I am making
  • All existing and new tests are passing.

🤖 Generated with Claude Code

jokerttu and others added 2 commits June 4, 2026 14:37
- Convert the plugin's android/build.gradle + settings.gradle to Kotlin DSL (.kts).
- Plugin: apply KGP conditionally (only on AGP < 9).
- Replace deprecated `kotlinOptions {}` with `kotlin { compilerOptions {} }` in plugin and example.
- Raise Java/Kotlin target 11 → 17 (matches Flutter templates and Navigation SDK requirement).
- Bump example Gradle wrapper 8.13 → 8.14.3 and Kotlin (KGP) 2.1.0 → 2.3.20.
- Gate the ktfmt formatter behind `-Pktfmt` so it is never forced on consuming apps.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@google-cla
Copy link
Copy Markdown

google-cla Bot commented Jun 4, 2026

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants