I have a library AAR that’s built after proguarding, and an app that depends on this library AAR.
The proguard rules specified for kotlinx-coroutines-core-
are causing kotlinx.coroutines.CoroutineExceptionHandler and kotlinx.coroutines.internal.MainDispatcherFactory names to be kept, causing duplicate class error while building the app-
Duplicate class kotlinx.coroutines.CoroutineExceptionHandler found in modules classes.jar (com.example.test:lib-android:0.0.1) and kotlinx-coroutines-core-1.3.2.jar (org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.2)
Duplicate class kotlinx.coroutines.internal.MainDispatcherFactory found in modules classes.jar (com.example.test:lib-android:0.0.1) and kotlinx-coroutines-core-1.3.2.jar (org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.2)
Is this expected or am I missing something? Any way to fix this issue?
Thanks.