-
Notifications
You must be signed in to change notification settings - Fork 315
Description
Summary
When using com.hannesdorfmann:adapterdelegates4-kotlin-dsl-viewbinding:4.3.2 in a project on Kotlin 2.2.21 with the kotlin-parcelize plugin, the dependency tree drags in org.jetbrains.kotlin:kotlin-android-extensions-runtime:1.5.31, which is deprecated.
This collides with org.jetbrains.kotlin:kotlin-parcelize-runtime:2.2.21, producing duplicate class errors for kotlinx.android.parcel.*.
Environment
Kotlin: 2.2.21
Kotlin Parcelize plugin: 2.2.21
AGP: 8.13.2
Gradle: 8.14.3
Library: com.hannesdorfmann:adapterdelegates4-kotlin-dsl-viewbinding:4.3.2
AndroidX / other deps: standard, no explicit android-extensions usage.
Error (build output)
Duplicate class kotlinx.android.parcel.IgnoredOnParcel found in modules kotlin-android-extensions-runtime-1.5.31.jar (org.jetbrains.kotlin:kotlin-android-extensions-runtime:1.5.31) kotlin-parcelize-runtime-2.2.21.jar (org.jetbrains.kotlin:kotlin-parcelize-runtime:2.2.21)... (Parceler, Parcelize, RawValue, TypeParceler, WriteWith)
Steps to Reproduce
- Create an Android project with Kotlin 2.2.21 and apply kotlin-parcelize.
- Add implementation("com.hannesdorfmann:adapterdelegates4-kotlin-dsl-viewbinding:4.3.2").
- Build the app.
- Build fails with duplicate classes from kotlin-android-extensions-runtime vs kotlin-parcelize-runtime.
Expected
The library should not bring kotlin-android-extensions-runtime (deprecated since Kotlin 1.4) and should remain compatible with current Kotlin/Parcelize without duplicate classes.
Actual
kotlin-android-extensions-runtime:1.5.31 is pulled transitively, causing duplicate class errors with kotlin-parcelize-runtime:2.2.21.
Please remove the kotlin-android-extensions-runtime dependency (or replace it with the modern parcelize runtime aligned to current Kotlin), and, if needed, bump Kotlin stdlib/parcelize to match current Kotlin releases so users don’t need manual excludes.