Does `kotlin.mpp.enableGranularSourceSetsMetadata=...
# kotlin-native
s
Does
kotlin.mpp.enableGranularSourceSetsMetadata=true
work with Android Studio? I tried creating a common sourceset that was common between macosx64 and iosX64 and iosArm64, and I couldn’t get any code completion. Is this expected to work?
r
I've had mixed results in general, but for native stuff you'll probably want to also add
kotlin.native.enableDependencyPropagation=false
. It also often works better in Intellij than AS since it has newer IDE internals.
The whole thing should be improving a lot in upcoming Kotlin versions but the newest stuff wasn't quite ready in time for 1.5.0
s
Thanks 🙂 That appears to have worked
p
Wasn't intellij incompatible with the latest agp plugins?
r
Intellij is generally a version behind in what AGP is supported, but I still tend to prefer it for KMP stuff (as long as you don’t need Compose) because Android Studio is generally a version behind in what Intellij Platform it’s built on, and that impacts IDE support for these sorts of things
1
s
After making the change, it seems like I’m getting ide errors
m
In general, I haven't really been able to get autocomplete for Android + MPP working well. I have a bunch of starred issues about this. Main ones are: • https://issuetracker.google.com/issues/165921901https://youtrack.jetbrains.com/issue/KT-43918https://youtrack.jetbrains.com/issue/KT-32814 For now what we do is we disable the android plugin during Idea sync so that Idea doesn't see it but building from the command line works. Not ideal but 🤷 .