hallvard
10/08/2018, 11:31 AMtarek
10/08/2018, 11:37 AMkotlinJs
projects but it’s not clear how to use it from a multiplatform projecthallvard
10/08/2018, 11:39 AMtarek
10/08/2018, 1:35 PMtask linkJs {
dependsOn "compileKotlinJs"
doLast {
def jsMain = kotlin.targets.js.compilations.main
jsMain.runtimeDependencyFiles.each { File file ->
copy {
from(zipTree(file.absolutePath), {
includeEmptyDirs = false
include { fileTreeElement ->
def path = fileTreeElement.path
path.endsWith(".js") && (path.startsWith("META-INF/resources/") ||
!path.startsWith("META-INF/"))
}
})
into jsMain.output.classesDir.absolutePath + "/lib"
}
}
}
}
jsMainClasses.dependsOn("linkJs")