After publishing a Kotlin Multiplatform project to...
# multiplatform
e
After publishing a Kotlin Multiplatform project to a local Maven repository, I've tried importing it in another Java project. Importing works ok, but source resolution doesn't work at all. Is this a known issue?
j
Yes, this is a known issue.
e
Thanks Jeff. Do you recall if there is an associated YouTrack ticket? I think this impact productivity quite a lot from the Java side
j
I can't recall. I'll see if I can find one. I've run into this issue myself and it's definitely an annoyance.
e
By what you're saying, there is no known workaround.
j
A workaround may be to publish to another local maven repository instead of Maven Local. I haven't done this myself though.
e
Oh wait, so this is strictly related to local? Publishing to central or other repos works? 🤔
j
Yes, I believe it should.
e
I mean, I suppose what I can do to verify is pick a KMP library from Maven Central and import it
Copy code
com.apollographql.apollo3:apollo-runtime:4.0.0-alpha.3
This one seems to resolve sources correctly. Seems you were right Jeff
j
Yeah, I haven't had a problem viewing sources of published libraries.
Maven Local just has some odd behavior.
e