Skip to content

fix(android): stop the false "applies KGP" warning on built-in Kotlin - #1260

Merged
xianshijing-lk merged 1 commit into
livekit:mainfrom
saimskywalker:fix/kgp-warning-builtin-kotlin
Oct 26, 2026
Merged

xianshijing-lk merged 1 commit into
livekit:mainfrom
saimskywalker:fix/kgp-warning-builtin-kotlin

Conversation

@saimskywalker

Copy link
Copy Markdown
Contributor

Kept seeing livekit_client in the "plugins that apply Kotlin Gradle Plugin (KGP)" warning on Flutter 3.47.7 + AGP 9.1, even though the guard from #1102 already skips KGP there.

Flutter doesn't check what actually got applied. It reads build.gradle as text and looks for an apply plugin: "kotlin-android" line, so the one inside the if still counts.

Swapping that line to pluginManager.apply does the same thing at runtime, it just doesn't trip the check:

if (!builtInKotlinActive) {
    pluginManager.apply("kotlin-android")
}

AGP 8 and android.builtInKotlin=false still get KGP from the same line, so nothing changes for older setups.

Checked with a debug build of a throwaway app on Flutter 3.47.7 / AGP 9.1.0 with android.builtInKotlin=true: before, the warning listed flutter_webrtc, livekit_client; after, it only lists flutter_webrtc (the published 1.6.3 still has the same pattern, flutter-webrtc/flutter-webrtc#2249 makes the same change there). The build succeeds either way.

I added a changeset file for it.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

@CLAassistant

CLAassistant commented Oct 26, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@xianshijing-lk

Copy link
Copy Markdown
Contributor

Thanks for fixing it.

@xianshijing-lk
xianshijing-lk merged commit 3d51b2a into livekit:main Oct 26, 2026
14 of 15 checks passed
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.

3 participants