how does one add platform-specific 1) plugins 2) t...
# multiplatform
e
how does one add platform-specific 1) plugins 2) tasks using the new multiplatform plugin? I'm trying to setup testing for the JS target using the
com.moowork.node
plugin and a bunch of custom tasks and struggling to wrap my head around it
a
Yea, I'm also really looking forward to this
👍 1
r
Does it need to be a single module? The only workaround I've known for this sort of thing (in my case, for having kapt dependencies) has been to pull that into its own platform-specific module that consumes the multiplatform one. In general I've found the old style of multi-module projects much easier to work with and intuit about when it comes to that sort of thing.
e
indeed, the old DSL feels a lot more flexible
Does it need to be a single module?
I guess this is what the new plugin is trying to promote, so this is the direction I'm exploring right now
l
1. Just apply them from the top level, like it’s done here, for example: https://discuss.kotlinlang.org/t/kotlin-1-3-m2-new-multiplatform-projects-model/9264/107 2. Does this example work for you? https://github.com/Kotlin/kotlinx.atomicfu/blob/nmpp/atomicfu/build.gradle#L72 Platform-specific task names may be accessed as described here: http://kotlinlang.org/docs/reference/building-mpp-with-gradle.html#setting-up-targets (I’ll take away the feedback that it’s hard to find, though)
Note that support of
kotlin-frontend
plugin is still in progress: https://youtrack.jetbrains.com/issue/KT-27249
👍 1
e
perfect, thank you! I'll play around with it
👍🏻 2