Is it possible to have normal module and multiplat...
# multiplatform
m
Is it possible to have normal module and multiplatform module in the same gradle project?
e
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
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
e
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
no
I mean gradle project that has both normal jvm and multiplatform submodules
e
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
ah, so normal JVM project cannot depend on multi module project (its jvm artifact)?
e
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