Patrick
04/27/2020, 9:42 AMArtyom Degtyarev [JB]
04/27/2020, 9:52 AMsourceSets{
mingwMain {
dependsOn(commonMain)
mingwX64Main.dependsOn(it)
mingwX86Main.dependsOn(it)
}
}
The problem here is that all platform libraries resolve can break up. In most cases, IDE just presumes the intermediate source set is just a common Kotlin code. There are several workarounds like enabling
kotlin.mpp.enableGranularSourceSetsMetadata=true
in the project’s gradle.properties
, but IIRC there are no guarantees for it’s help.
100% working method will be sharing all platform-independent code as a common, and duplicate all platform-dependent in both of the target’s default source sets(mingwX64Main
, mingwX86Main
).