[Gradle, JS] Fix test with new API

^KT-41054 fixed
This commit is contained in:
Ilya Goncharov
2020-08-11 20:00:29 +03:00
parent 5eda8e95bf
commit 85f23d8c6e
@@ -1,3 +1,5 @@
import org.jetbrains.kotlin.gradle.targets.js.yarn.YarnResolution
plugins { plugins {
kotlin("js").version("<pluginMarkerVersion>") kotlin("js").version("<pluginMarkerVersion>")
} }
@@ -10,13 +12,14 @@ repositories {
jcenter() jcenter()
} }
dependencies { rootProject.plugins.withType(org.jetbrains.kotlin.gradle.targets.js.yarn.YarnPlugin::class.java) {
constraints { rootProject.the<org.jetbrains.kotlin.gradle.targets.js.yarn.YarnRootExtension>().apply {
implementation(org.jetbrains.kotlin.gradle.targets.js.npm.NpmDependencyConstraint(project, "lodash", "^1.0.0")) { resolutions.add(
version { YarnResolution("lodash").apply {
reject("~1.2.1", "1.3.0 - 1.4.0") include("^1.0.0")
exclude("~1.2.1", "1.3.0 - 1.4.0")
} }
} )
} }
} }