[Gradle, JS] Add root cache directory changing to test

This commit is contained in:
Ilya Goncharov
2023-03-06 20:47:30 +04:00
committed by Space Team
parent d87468ef39
commit bcf7c38288
@@ -1,3 +1,6 @@
import org.jetbrains.kotlin.gradle.targets.js.dsl.KotlinJsBinaryMode
import org.jetbrains.kotlin.gradle.targets.js.ir.JsIrBinary
plugins {
kotlin("js")
}
@@ -12,5 +15,16 @@ kotlin {
browser {
}
binaries.executable()
val main by compilations.getting
main.binaries
.matching { it.mode == KotlinJsBinaryMode.DEVELOPMENT }
.matching { it is JsIrBinary }
.all {
this as JsIrBinary
linkTask.configure {
val rootCacheDir = rootCacheDirectory.get()
rootCacheDirectory.set(rootCacheDir)
}
}
}
}