Thread
#multiplatform
    krtko

    krtko

    4 years ago
    A platform module can only import one common module. <Issue resolved> Thanks 🙂
    ilya.gorbunov

    ilya.gorbunov

    4 years ago
    common modules can only depend on other common modules and platform module can depend on common with expectedBy dependency.
    krtko

    krtko

    4 years ago
    But you can only have one
    expectedBy
    import. I thought it was just for the Expect/Actual set up. Also importing multiple common modules the normal way seems to be working
    ilya.gorbunov

    ilya.gorbunov

    4 years ago
    Each common module should have corresponding platform module, which declares expectedBy dependency on it. Currently it is 1-to-1 relationship (but for each platform)
    krtko

    krtko

    4 years ago
    Can a platform module import multiple common modules (all without any expect/actual classes) just fine?
    Alright I think I finally get what you were saying. So a platform module can only import one common module and it can only import it via expectBy
    So can you not chain multiple common modules together? It does not look like you can.
    Ok known limitation for now. Good to know @ilya.gorbunov Thank you
    ilya.gorbunov

    ilya.gorbunov

    4 years ago
    You can chain common modules together, but each common module must have a platform implementation module (even if there are no
    expect
    declarations), and platform modules must be chained respectively
    krtko

    krtko

    4 years ago
    When I do Core (imports nothing) Shared (imports Core) App (imports Shared) I get an error saying Shared is missing the Core’s classes
    If this is a bug. I can look into it further and open a ticket?
    ilya.gorbunov

    ilya.gorbunov

    4 years ago
    You need to create Core-JVM for Core and add a dependency in App on Core-JVM
    krtko

    krtko

    4 years ago
    Shared has the Core dependencies? Isn’t that the same thing?
    Or are you saying something like Core (imports nothing, common) Shared (imports Core, contains expect class, common) AppDependency(imports Core and Shared, JVM) App (expectBy AppDependency, contains actual class, JVM)
    ilya.gorbunov

    ilya.gorbunov

    4 years ago
    say you have
    A:common
    ,
    B:common (depends on A:common)
    then you need to have
    A:platform expectedBy A:common
    ,
    B:platform expectedBy B:common
    and
    B:platform depends on A:platform
    krtko

    krtko

    4 years ago
    Oh
    So every common module would need a “mock” platform module if theres no expectBy
    Thanks for making this clear
    ilya.gorbunov

    ilya.gorbunov

    4 years ago
    Starting from 1.2.40 it will be possible not to have A😛latform, and declare both expectedBy dependencies in B😛latform
    krtko

    krtko

    4 years ago
    Awesome thanks for letting me know. So far the multiplatform set up is pretty neat. My company is building our web app with it. Thank you for your help