follow up question...is it possible to write a mod...
# multiplatform
k
follow up question...is it possible to write a module in completely common kotlin and add it to any project? Or do I have to explicitly declare jvm/js/linux/ios/etc
d
You have to be explicit for now.
1.4
should improve things.
k
so, would implementation modules just be...empty?
d
Yes. (Here's the relevant YouTrack issue https://youtrack.jetbrains.com/issue/KT-30088)
k
cool, thanks!
r
For now, you can just iterate through all presets and build each one. I do it like this in Multiplatform Settings:
Copy code
kotlin {
    ...
    presets.forEach {
        if (it.name == "jvmWithJava") return@forEach // Probably don't need this, and it chokes on Android plugin
        if (targets.findByName(it.name) == null) {
            targetFromPreset(it)
        }
    }
}