thana
11/26/2019, 8:45 AMLong
value from the klock-library. Unfortunately klock-js brings its own kotlin.js library hence the Kotlin.Long
returned by klock is not the same Kotlin.Long
the rest of the application uses. Is there a way to exclude klock's dependency on kotlin?Roman Artemev [JB]
11/26/2019, 7:50 PMkotlin.js
help?thana
11/27/2019, 9:45 AMtasks.getByName("kotlinNpmInstall") {
doLast {
File("$buildDir/js/node_modules/klock-root-klock/node_modules").deleteRecursively()
}
}
But unfortunately that doesn't work in my main project as this task doesn't exist - and i couldn;t fgure out yet, whats the correct oneIlya Goncharov [JB]
11/27/2019, 9:54 AMnode_modules/kotlin
for reliability (maybe in future there are other klock’s dependencies)
It needs to investigate, but seems that kotlin shouldn’t be transitive dependency at all
So you can use it untill klock fix its npm kotlin dependency
tasks.getByName("kotlinNpmInstall") {
doLast {
File("$buildDir/js/node_modules/klock-root-klock/node_modules/kotlin").deleteRecursively()
}
}
thana
11/27/2019, 9:56 AMthana
11/27/2019, 9:57 AMIlya Goncharov [JB]
11/27/2019, 10:01 AMdoFirst
trigger on your jsNodeTest
tasks.getByName("jsNodeTest") {
doFirst {
File("$buildDir/js/node_modules/klock-root-klock/node_modules").deleteRecursively()
}
}
But I would like to understand, why you have not kotlinNpmInstall
taskthana
11/27/2019, 10:03 AMthana
11/29/2019, 2:26 PMkotlinNpmInstall
does not exist: it exists on the root project only - but i have a multi (gradle-)module project.
Also i have to delete the js files from the $buildDir
of the root module. now it works :-)thana
11/29/2019, 2:32 PMafterEvaluate
blockl inside the submodules
block referencing the rootProject
again. putting it on the root project directly doesn't work 🤷♂️