int02h
10/04/2021, 9:19 AMkotlin-coroutines-core
different versions. I’ve used resolutionStrategy
Gradle feature to force using the same 1.4.3 version of coroutines but during release build I get the R8 (ProGuard) error like:
ERROR:/Users/*****/***********/app/build/intermediates/module_and_runtime_deps_classes/preliveGooglePlayRelease/base.jar: R8: Type kotlinx.coroutines.debug.AgentPremain is defined multiple times: /Users/*****/***********/app/build/intermediates/module_and_runtime_deps_classes/preliveGooglePlayRelease/base.jar:kotlinx/coroutines/debug/AgentPremain.class, /Users/*****/***********/voip_ui/build/intermediates/module_and_runtime_deps_classes/preliveGooglePlayRelease/feature-voip_ui.jar:kotlinx/coroutines/debug/AgentPremain.class
As I see AgentPremain
indeed contained in both kotlin-coroutines-core
and kotlin-coroutines-core-jvm
with sligtly different byte code. The interesting thing is that kotlin-coroutines-core
introduces the dependency to kotlin-coroutines-core-jvm
according to Gradle dependency graph:
+--- org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.7 -> 1.4.3
| \--- org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.4.3
and the POM file says the same:
<dependency>
<groupId>org.jetbrains.kotlinx</groupId>
<artifactId>kotlinx-coroutines-core-jvm</artifactId>
<version>1.4.3</version>
<scope>compile</scope>
</dependency>
I wonder how two dependent libraries could have the same class but with different code inside them? Maybe I do something wrong?louiscad
10/04/2021, 11:22 AMint02h
10/04/2021, 1:22 PM