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

tseisel

12/15/2021, 10:26 AM
Does anyone have issues with
kotlin.mpp.enableGranularSourceSetsMetadata=true
? While my MPP library builds totally fine, it's wreaking havoc in my IDE (be it IntelliJ or Android Studio) : •
public
modifiers are labelled as redundant (but
exlicitApi()
it enabled, removing them fails the build) •
commonMain
sources may import declarations from
java.*
, which is illegal •
expect
declarations are marked as errors due to "Kotlin Multiplatform is an experimental feature" If I remove this config flag, I only have errors indicating that some
expect
declarations have no implementation in a given platform.
k

kpgalligan

12/15/2021, 2:19 PM
It's been tricky for the IDE for some time. The situation has improved recently, but it'll depend on Kotlin version, IDE version, and library versions.
t

tseisel

12/15/2021, 3:03 PM
Kotlin version: 1.5.32 Android Studio version: Android Studio Arctic Fox | 2020.3.1 Patch 4 Kotlin plugin: 203-1.6.10-release-923-AS7717.8 Hope this will be fixed in the near future
k

kpgalligan

12/15/2021, 4:18 PM
Your kotlin plugin version is newer than the kotlin version. I would try bumping kotlin to 1.6.10. Also, Android Studio and Intellij sometimes fall a bit out of sync. But, yeah, hierarchical source sets can take some tweaking to clear up.