https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
g

gildor

12/08/2018, 10:05 AM
I really don't understand this thing about "kotlin-multiplatform doesn't support kts". I tried probably 50 Gradle plugins with Kotlin DSL and some surely had problems with Kotlin DSL, most of them are pretty good out of the box. Main reason why plugin could be hard to use from Kotlin DSL: usage of dynamic features of Groovy and bypassing standard Gradle APIs for extensions. And this is exactly what MPP plugin does. It's or course possible to configure it using Kotlin DSL, I did it, but it would be much more simple if mpp would not use dynamic (sic!) function fromPreset (I really don't see any reason why such function should be dynamic). Other parts are not so pleasant to use, for example matching preset declaration and preset configuration by name, but it's not so big problem, you have the same in groovy. I just kinda disappointed that Kotlin team newest plugin has such problems, because it would be possible to give fine experience out of the box without significant changes of existing dsl if Kotlin+Groovy would be both considered as first class citizens and we wouldn't be in situation when we wait for special "Kotlin Gradle wrapper" for this plugin and newcomers in Kotlin DSL now think "oh, not every plugin suppors Kotlin DSL, even ones from Kotlin team" which itself bad for users and a bad example for possible Gradle plugin authors
3