Ran
05/19/2022, 2:07 PMsourceSets {
val commonMain by getting {
dependencies {
implementation("com.calculation.multiplatform:MultiplatformBigDecimal:1.0.0-beta6")
}
}
val commonTest by getting {
dependencies {
implementation(kotlin("test"))
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.3.2")
implementation("org.jetbrains.kotlinx:kotlinx-datetime:0.3.2")
}
}
}
The ios unit tests and JVM unit tests work well. But when I run js unit tests, I got the following error:
Could not determine the dependencies of task ':jsTestPackageJson'.
> Could not resolve all dependencies for configuration ':jsTestNpm'.
> Could not resolve com.calculation.multiplatform:MultiplatformBigDecimal:1.0.0-beta6.
Required by:
project :
> No matching variant of com.calculation.multiplatform:MultiplatformBigDecimal:1.0.0-beta6 was found. The consumer was configured to find a usage of 'kotlin-runtime' of a library, preferably optimized for non-jvm, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'js', attribute 'org.jetbrains.kotlin.js.compiler' with value 'ir' but:
I cannot understand the message. Is there anyone who can tell me how can I solve this problem?Grégory Lureau
05/19/2022, 2:11 PMBig Chungus
05/19/2022, 2:13 PMRan
05/19/2022, 2:17 PMRan
05/19/2022, 2:17 PMBig Chungus
05/19/2022, 2:20 PMGrégory Lureau
05/19/2022, 2:35 PMkotlin {
js(IR) {
browser { ... }
binaries.library()
}
(if you can copy just the js part, it could help us to help you)Ran
05/19/2022, 2:38 PMjs {
useCommonJs()
browser()
testRuns["test"].executionTask.configure {
useCommonJs()
}
}
Ran
05/19/2022, 2:38 PMGrégory Lureau
05/19/2022, 2:41 PMRan
05/19/2022, 2:42 PMRan
05/19/2022, 2:45 PMRan
05/19/2022, 2:46 PMjs(IR) {
useCommonJs()
browser()
testRuns["test"].executionTask.configure {
useCommonJs()
}
binaries.library()
}
Ran
05/19/2022, 2:47 PMRan
05/19/2022, 2:47 PMRan
05/19/2022, 2:48 PMjs(IR) {
useCommonJs()
browser()
binaries.library()
}
This works for meRan
05/19/2022, 2:49 PMRan
05/19/2022, 2:57 PMBig Chungus
05/19/2022, 6:38 PMBig Chungus
05/19/2022, 6:39 PMBig Chungus
05/19/2022, 6:40 PMRan
05/20/2022, 1:29 AM