Hi, Im involved in a kotlin multiplatform project ...
# gradle
k
Hi, Im involved in a kotlin multiplatform project - and my gradle skills leaves a bit to be desired. Does anybody have a few pointers on how to write a task that executes after another task. For example:```
Copy code
task myTask {
    dependsOn(tasks.named("jsMainClasses").get())
    println("A task running after jsMainClasses is done.")
}
Our use-case is that I want to copy the js-build artifacts to a different location after they are built
t
seems you need to write following :
Copy code
tasks.register("copyJsBuild", Copy::class.java) {
    from tasks.named("jsMainClasses")
    into file("target-dir")
}
then "copyJsBuild" task will have dependency on "jsMainClasses" task
k
Thanks!