Hello đź‘‹ ,
I have a KMP library which targets are jvm and native which I was sharing with android and iOS apps. It is targeting jvm as it doesn’t have any android dependency. It works okay before kotlin 2.0 & k2 compiler
Have someone got a similar setup? Do I need to target Android instead of jvm in order to get it working?
t
tapchicoma
05/03/2024, 12:33 PM
I would say yes if you only interested in Android. Kotlin 2.0 starts tracking more precisely source set hierarchy, which is why you see this problem.
m
mohamed rejeb
05/04/2024, 5:43 AM
So even for libraries without any android specific APIs we need to set android target to get it working? What about the agp and android library gradle configuration, do we need to set it up as well?
c
Carlos Monzon
05/04/2024, 6:50 AM
Thanks @tapchicoma
Will try that.
FYI @mohamed rejeb the build works for me but it fails when doing lint from the android app.
I guess it is related to what Yahor says.