[Gradle, JS] Fix test with new API
^KT-41054 fixed
This commit is contained in:
+9
-6
@@ -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")
|
||||||
}
|
}
|
||||||
}
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user