You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In KMP projects using AGP 9's com.android.kotlin.multiplatform.library plugin, BCV registers no androidApiDump/androidApiCheck tasks. Existing api/android/*.api golden files stop being validated or updated, while apiCheck stays green. There is no warning, so the coverage loss is silent.
This is distinct from #312. That issue covers android-only modules where AGP 9's built-in Kotlin prevents BCV from recognizing any Kotlin plugin. This issue is the KMP case, where BCV does see the android target but skips it.
KMP module applying org.jetbrains.kotlin.multiplatform, com.android.kotlin.multiplatform.library, and org.jetbrains.kotlinx.binary-compatibility-validator, with jvm() and an android {} target.
Run ./gradlew :module:tasks --all | grep -i api.
What you will observe: only jvmApiDump/jvmApiCheck (plus klib tasks). Before migrating (same module with KGP androidTarget() on AGP 8), androidApiDump/androidApiCheck existed and api/android/module.api was maintained.
Real-world reproducer: MobileNativeFoundation/Store#736, where the jvm dumps updated on a Kotlin bump but the android dumps could not, and CI stayed green.
Root cause
BinaryCompatibilityValidatorPlugin matches androidJvm targets and then registers tasks via:
The AGP KMP plugin creates its target through KGP's external-target API (KotlinMultiplatformAndroidLibraryTarget, platform type androidJvm) with compilations named main, hostTest, and deviceTest. No compilation named release exists, so the matcher is empty and no task is registered.
JetBrains fixed the equivalent bug in KGP's built-in ABI validation in KT-85950 ("only release compilations are read. However, we need to use main for this plugin"). It will ship in Kotlin 2.4.20-Beta2 (Sep 2026).
Impact
The failure is silent. I did a quick search and found other examples where Android dumps have been frozen but JVM and klib dumps keep updating:
There are surely more libraries hitting this. Every KMP library will eventually cross this migration, since the legacy variant APIs the old path depends on are slated for removal in AGP 10.
Ask
Understanding the plugin is in maintenance mode, in order of preference:
Also match the main compilation for androidJvm targets (the mirror of the KT-85950 fix). Arguably within the stated maintenance scope of supporting current toolchain versions.
If a fix is out of scope, emit a warning when an androidJvm target is present but no compilation matched, and add a README note pointing AGP 9 KMP users to KGP's built-in abiValidation on Kotlin 2.4.20+.
Summary
In KMP projects using AGP 9's
com.android.kotlin.multiplatform.libraryplugin, BCV registers noandroidApiDump/androidApiChecktasks. Existingapi/android/*.apigolden files stop being validated or updated, while apiCheck stays green. There is no warning, so the coverage loss is silent.This is distinct from #312. That issue covers android-only modules where AGP 9's built-in Kotlin prevents BCV from recognizing any Kotlin plugin. This issue is the KMP case, where BCV does see the android target but skips it.
Environment
com.android.kotlin.multiplatform.libraryReproduction
org.jetbrains.kotlin.multiplatform,com.android.kotlin.multiplatform.library, andorg.jetbrains.kotlinx.binary-compatibility-validator, withjvm()and anandroid {}target../gradlew :module:tasks --all | grep -i api.What you will observe: only
jvmApiDump/jvmApiCheck(plus klib tasks). Before migrating (same module with KGP androidTarget() on AGP 8),androidApiDump/androidApiCheckexisted andapi/android/module.apiwas maintained.Real-world reproducer: MobileNativeFoundation/Store#736, where the jvm dumps updated on a Kotlin bump but the android dumps could not, and CI stayed green.
Root cause
BinaryCompatibilityValidatorPluginmatchesandroidJvmtargets and then registers tasks via:The AGP KMP plugin creates its target through KGP's external-target API (
KotlinMultiplatformAndroidLibraryTarget, platform typeandroidJvm) with compilations named main, hostTest, and deviceTest. No compilation named release exists, so the matcher is empty and no task is registered.JetBrains fixed the equivalent bug in KGP's built-in ABI validation in KT-85950 ("only release compilations are read. However, we need to use main for this plugin"). It will ship in Kotlin 2.4.20-Beta2 (Sep 2026).
Impact
The failure is silent. I did a quick search and found other examples where Android dumps have been frozen but JVM and klib dumps keep updating:
There are surely more libraries hitting this. Every KMP library will eventually cross this migration, since the legacy variant APIs the old path depends on are slated for removal in AGP 10.
Ask
Understanding the plugin is in maintenance mode, in order of preference:
androidJvmtargets (the mirror of the KT-85950 fix). Arguably within the stated maintenance scope of supporting current toolchain versions.androidJvmtarget is present but no compilation matched, and add a README note pointing AGP 9 KMP users to KGP's built-in abiValidation on Kotlin 2.4.20+.