carp-dk / carp-dk/carp_study_app

chore(android): migrate app to Built-in Kotlin (drop standalone Kotlin Gradle Plugin)

Open
#658 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Dart
Stars
10
Forks
5
Avg merge
1d 3h
Merged PRs (30d)
14

Description

## Problem
The Android app still applies the standalone **Kotlin Gradle Plugin (KGP)**, which Flutter is deprecating. Building logs:

> WARNING: Your Android app project applies the Kotlin Gradle Plugin, which will cause build failures in future versions of Flutter. Please migrate your app to **Built-in Kotlin**.

`android/app/build.gradle` still has:
- `id "kotlin-android"` (line 3)
- a `kotlinOptions { ... }` block (line 40)
- `main.java.srcDirs += 'src/main/kotlin'` (line 45)

Migration guide: https://docs.flutter.dev/release/breaking-changes/migrate-to-built-in-kotlin/for-app-developers

## Current versions (post-#598 — already upgraded)
- AGP **9.0.1**, Gradle **9.1.0**, Kotlin **2.2.20**, Flutter **3.44.6**
- So this is *not* a version bump — it's the plugin-application migration only.

## Also flagged: plugins that apply KGP
Flutter warns these dependencies apply KGP and could block future builds until each ships a Built-in-Kotlin-compatible release:

`audio_streamer, camera_android_camerax, device_info_plus, flutter_activity_recognition, flutter_background, flutter_timezone, flutter_web_auth_2, health, light, location, network_info_plus, oidc_android, open_settings_plus, package_info_plus, pedometer, polar`

We can only migrate the app project ourselves; for the plugin warnings we depend on upstream releases — track and bump as compatible versions land, and report/patch any that lag.

## Acceptance criteria
- [ ] `android/app/build.gradle` migrated to Built-in Kotlin per the guide (no standalone `kotlin-android` apply)
- [ ] App builds on Android in release mode with no KGP deprecation warning for the app project
- [ ] Audit the listed plugins; bump those with Built-in-Kotlin-compatible releases, note the blockers for the rest

## Related
- #598 — Gradle/Kotlin/AGP version upgrade (merged; this is the follow-up plugin migration)

Contributor guide

No contributing guide indexed for this repository

Research direction

Read the migration guide and inspect android/app/build.gradle, especially the kotlin-android, kotlinOptions, and main.java.srcDirs entries. Build the Android app in release mode, then audit the listed plugins for Built-in-Kotlin-compatible releases. Done means the app has no standalone KGP warning and remaining plugin blockers are recorded.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, dart, flutter, kotlin
Domain
build-system, mobile
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
65/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.