I’m having trouble resolving an expect/actual decl...
# multiplatform
s
I’m having trouble resolving an expect/actual declaration from another local gradle module in my project. Either I can see it in the common code, but not in the native sourceset or vice versa. Anyone know the best way to resolve problems like this? @russhwolf You gave me the recommended settings to resolve problems like this a 4 or 5 months ago. Has anything changed regarding this?
I’m currently configuring the build only to use the platform we’re currently building for. Is there a better way to do this now that someone could point me to?
Copy code
kotlin {
    jvm()

    when (getDarwinTypeForBuild()) {
        DarwinType.IOS_ARM64 -> iosArm64("darwin")
        DarwinType.IOS_X64 -> iosX64("darwin")
        DarwinType.TVOS_ARM64 -> tvosArm64("darwin")
        DarwinType.TVOS_X64 -> tvosX64("darwin")
    }
r
I don't remember what advice I gave you previously, but 1.5.30 got a lot better at resolving intermediate sources so you could try manually declaring a shared darwin source a la https://kotlinlang.org/docs/mpp-share-on-platforms.html#configure-the-hierarchical-structure-manually
s
@russhwolf So when we previously tried something like that, syncing gradle took FOREVER because it would determine all the common and intermediate sources for the dependencies of the 12+ modules that we do this for.
Has this gotten better?
r
They've rewritten a lot of the internals, so probably. I don't have numbers though
s
might try it then