https://kotlinlang.org logo
b

Bradford Canonigo

08/03/2021, 11:43 AM
Has anyone had issues with having the
test-common
and
test-annotations-common
dependencies? I can't build my project because of this error:
> Could not resolve all artifacts for configuration ':kmpSample:debugAndroidTestRuntimeClasspath'.
> Could not resolve org.jetbrains.kotlin:kotlin-test-common:1.5.21.
Required by:
project :kmpSample
> Cannot find a version of 'org.jetbrains.kotlin:kotlin-test-common' that satisfies the version constraints:
Dependency path 'kmpSample:kmpSample:1.0' --> 'org.jetbrains.kotlin:kotlin-test-common:1.5.21'
Constraint path 'kmpSample:kmpSample:1.0' --> 'org.jetbrains.kotlin:kotlin-test-common:{strictly 1.5.10}' because of the following reason: debugRuntimeClasspath uses version 1.5.10
Dependency path 'kmpSample:kmpSample:1.0' --> 'kmpSample:kmpSample:1.0' --> 'io.insert-koin:koin-test:3.1.1' --> 'io.insert-koin:koin-test-jvm:3.1.1' --> 'org.jetbrains.kotlin:kotlin-test-common:1.5.10'
Here's my build.gradle.kts: I only showed the source sets with test frameworks
Copy code
sourceSets["commonMain"].dependencies {
            api(Dependencies.Koin.core)
            api(Dependencies.Koin.test)
        }

sourceSets["commonTest"].dependencies {
            implementation(kotlin("test-common"))
            implementation(kotlin("test-annotations-common"))
            implementation(Dependencies.mockk)
        }