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

serebit

02/25/2019, 6:09 PM
you need to apply the mpp plugin in
ios.gradle.kts
as well
b

basher

02/25/2019, 6:10 PM
I tried
apply(plugin = "kotlin-multiplatform")
before the import statement, but I get the same result
Like this?
Copy code
apply(plugin = "kotlin-multiplatform")

import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTargetPreset
s

serebit

02/25/2019, 6:26 PM
I believe so. You could also try
plugins
notation, like “org.jetbrains.kotlin.multiplatform”
b

basher

02/25/2019, 7:24 PM
after reviewing kotlin gradle dsl docs, looks like it's too early to switch to kotlin build gradle for this situation. afaict, you don't get type-safe accessors in applied scripts like this
seems like this covers the general issue: https://github.com/gradle/kotlin-dsl/issues/1287