aboutsummaryrefslogtreecommitdiff
path: root/build.gradle.kts
diff options
context:
space:
mode:
authorRobert Jaros <rjaros@finn.pl>2020-05-01 19:09:26 +0200
committerRobert Jaros <rjaros@finn.pl>2020-05-01 19:09:26 +0200
commitd14f17f01017944f7be8d3267a07dc0146aea36e (patch)
tree31021db2ceaea20eeb2ae70c84ec14b601f6edcb /build.gradle.kts
parente5207ee3e9f280777580fdf9ef7956303e08980a (diff)
downloadkvision-d14f17f01017944f7be8d3267a07dc0146aea36e.tar.gz
kvision-d14f17f01017944f7be8d3267a07dc0146aea36e.tar.bz2
kvision-d14f17f01017944f7be8d3267a07dc0146aea36e.zip
Force jQuery 3.4.1 and Moment.js 2.24.0 to workaround breaking issues.
Diffstat (limited to 'build.gradle.kts')
-rw-r--r--build.gradle.kts40
1 files changed, 26 insertions, 14 deletions
diff --git a/build.gradle.kts b/build.gradle.kts
index d1d5932c..b0609400 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -35,20 +35,20 @@ dependencies {
api("com.github.snabbdom:snabbdom-kotlin:$snabbdomKotlinVersion")
api("pl.treksoft:navigo-kotlin:$navigoKotlinVersion")
api("pl.treksoft:jquery-kotlin:$jqueryKotlinVersion")
- implementation(npm("css-loader", "3.5.2"))
- implementation(npm("style-loader", "1.1.4"))
- implementation(npm("less", "3.11.1"))
- implementation(npm("less-loader", "5.0.0"))
- implementation(npm("imports-loader", "0.8.0"))
- implementation(npm("uglifyjs-webpack-plugin", "2.2.0"))
- implementation(npm("file-loader", "6.0.0"))
- implementation(npm("url-loader", "4.1.0"))
- implementation(npm("jquery", "^3.5.0"))
- implementation(npm("fecha", "4.2.0"))
- implementation(npm("snabbdom", "0.7.4"))
- implementation(npm("snabbdom-virtualize", "0.7.0"))
- implementation(npm("jquery-resizable-dom", "0.35.0"))
- implementation(npm("navigo", "7.1.2"))
+ implementation(npm("css-loader", "^3.5.2"))
+ implementation(npm("style-loader", "^1.1.4"))
+ implementation(npm("less", "^3.11.1"))
+ implementation(npm("less-loader", "^5.0.0"))
+ implementation(npm("imports-loader", "^0.8.0"))
+ implementation(npm("uglifyjs-webpack-plugin", "^2.2.0"))
+ implementation(npm("file-loader", "^6.0.0"))
+ implementation(npm("url-loader", "^4.1.0"))
+ implementation(npm("jquery", "^3.4.1"))
+ implementation(npm("fecha", "^4.2.0"))
+ implementation(npm("snabbdom", "^0.7.4"))
+ implementation(npm("snabbdom-virtualize", "^0.7.0"))
+ implementation(npm("jquery-resizable-dom", "^0.35.0"))
+ implementation(npm("navigo", "^7.1.2"))
testImplementation(kotlin("test-js"))
}
@@ -83,6 +83,18 @@ fun copyResources() {
}
tasks {
+ withType<org.jetbrains.kotlin.gradle.targets.js.npm.tasks.KotlinNpmInstallTask> {
+ doLast {
+ yarnLock.parentFile.resolve("package.json").apply {
+ writeText(readText().replace(
+ "\"dependencies\": {},",
+ "\"dependencies\": {},\n \"resolutions\": { \"moment\": \"2.24.0\", \"jquery\": \"3.4.1\" },"
+ ))
+ }
+ org.jetbrains.kotlin.gradle.targets.js.yarn.YarnWorkspaces()
+ .yarnExec(project, yarnLock.parentFile, "Relaunching Yarn to fix resolutions")
+ }
+ }
getByName("JsJar", Jar::class) {
from("${project.buildDir}/js/packages/kvision/package.json")
}