Is it possible to have a dependency on a KMP proje...
# multiplatform
a
Is it possible to have a dependency on a KMP project (just the java part obviously) in a non-kmp project? Just trying to do this I get an error "could not resolve :myKmpProject", and most of the documentation shows the declaration to be done nested somewhere in the kotlin {} block of the gradle file which a simple java project doesn't have.
Copy code
dependencies {
    ...
    implementation project(':myKmpProject')
}
Might have resolved this by using withJava() in the kmp project. Is there ever a reason not to use that?
a
It is very possible. You don't even have to use the
withJava
configuration. Just make sure you are using the kotlin("jvm") plugin, I have had issues with just the java/application plugin
👍 1