Hey, I try to use Kotlin `1.4-M2` and related `1.3...
# coroutines
s
Hey, I try to use Kotlin
1.4-M2
and related
1.3.7-1.4-M2
Coroutines dependencies with Gradle 6.5 and get this error:
Copy code
> Could not resolve all files for configuration ':kotlin-coroutines:kotlinCompilerPluginClasspath'.
   > Could not resolve org.jetbrains.kotlinx:kotlinx-coroutines-core:1.2.1.
     Required by:
         project :kotlin-coroutines > org.jetbrains.kotlin:kotlin-scripting-compiler-embeddable:1.4-M2 > org.jetbrains.kotlin:kotlin-scripting-compiler-impl-embeddable:1.4-M2
         project :kotlin-coroutines > org.jetbrains.kotlin:kotlin-scripting-compiler-embeddable:1.4-M2 > org.jetbrains.kotlin:kotlin-scripting-compiler-impl-embeddable:1.4-M2 > org.jetbrains.kotlin:kotlin-scripting-common:1.4-M2
      > Cannot choose between the following variants of org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.7-1.4-M2:
          - iosArm32-api
          - iosArm32-iosArm32MetadataElements
          - iosArm64-api
          - ...
  All of them match the consumer attributes:
          - Variant 'iosArm32-api' capability org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.7-1.4-M2:
              - Unmatched attributes:
                  - Provides org.gradle.status 'release' but the consumer didn't ask for it
                  - Provides org.gradle.usage 'kotlin-api' but the consumer didn't ask for it
                  - Provides org.jetbrains.kotlin.native.target 'ios_arm32' but the consumer didn't ask for it
                  - Provides org.jetbrains.kotlin.platform.type 'native' but the consumer didn't ask for it
          - ...
Any hint about how to fix this (worked fine with Kotlin
1.3.72
and Coroutines
1.3.5
)?
l
I had a similiar problem that I fixed by changing implementation to runtime, runtime group: 'org.jetbrains.kotlin', name: 'kotlin-scripting-compiler-embeddable', version: '1.3.50'
I think that kotlin-scripting-compiler-impl-embeddable has a dependency on an older coroutine library which causes conflicts
s
Ok thanks for the hint 🙂