Hi,
I really, really like the new multiplatform model. Whilst we can use multiplatform modules as dependencies in other multiplatform projects and Android modules, if I have a Java library and want to use the multiplatform module as a dependency, that doesn’t seem to work.
e.g.
lib-java-module/build.gradle
implementation project(":lib-multiplatform-module")
With the above, lib-java-module won’t compile if it has any reference to classes in lib-multiplatform-module. I have also tried:
implementation project(path: ":lib-multiplatform-module", configuration: "jvmDefault")
Using configuration jvmDefault the module will compile, but it will throw a ClassNotFoundException the first time it encounters any class that is in lib-multiplatform-module. Once using the configuration jvmDefault in the dependency, the gradle dependencies task seems to show the right dependencies.
Is there a better way to consume a kotlin multiplatform module as a dependency in a java module?
Thanks/regards,
-Mike