Thread
#multiplatform
    m

    Matej Drobnič

    3 years ago
    Is it possible to have normal module and multiplatform module in the same gradle project?
    egorand

    egorand

    3 years ago
    what’s the use case for that?
    you can declare custom configurations and set different attributes on them, then the same multiplatform dependency will be resolved into different artifacts
    m

    Matej Drobnič

    3 years ago
    well I do not want to publish the library on maven yet, it is much more convenient to have them linked by gradle until it's finished
    egorand

    egorand

    3 years ago
    oh, wait, you’re saying you want to have a project with the same name to be both a standalone module and a platform variant of a multiplatform module inside the same project?
    m

    Matej Drobnič

    3 years ago
    no
    I mean gradle project that has both normal jvm and multiplatform submodules
    egorand

    egorand

    3 years ago
    sure, that works
    you can’t depend on a multi-module project though, every module is in fact a project, producing its own artifact
    m

    Matej Drobnič

    3 years ago
    ah, so normal JVM project cannot depend on multi module project (its jvm artifact)?
    egorand

    egorand

    3 years ago
    Multi module project produces multiple artifacts
    if by “multi module” you mean “multiplatform” - then yes, a JVM project can depend on the JVM variant of a multiplatform project
    the easiest way to make it work is by applying
    org.jetbrains.kotlin.jvm
    plugin to your JVM project