hi there. i am developing my very first KMP librar...
# library-development
a
hi there. i am developing my very first KMP library using multiplatform(“1.9.0”) its target all the platform (i think , i added all) . but for ios version i cant use this library if its multiplatform version 1.8.21 . other platform seems fine , getting errors like
Copy code
Incompatible abi version. The current default is '1.7.0', found '1.8.0'. The library produced by 1.9.0 compiler
anyway for android i need to change the plugin version bellow 8.0 otherwise get
Copy code
The applied Android Gradle Plugin version (8.1.0) is higher than the maximum known to the Kotlin Gradle Plugin
it worked if i change the version as it clear in the log .but i need to use older version and they dont support android 34 (show just a warning though) . i see most of the famous library support so many multiplatform version . how to do that ? find a middle multiplatform version that supported by latest and old ? which version will be most suitable ? and also in 1.9.0 the androidTarget() cant be used directly i needed to use android.library plugin thats ok but its not support newer library version ? i needed to use pluginResolutionStrategy and use module for android build tool . and some build tool version have problem too . thanks for your time .any insight will be a big help.
m
My experience is that native users are pretty much on the edge and wouldn't mind using Kotlin 1.9.0
For JVM you can use 'apiVersion' and 'languageVersion' to compile using 1.9.0 but still be compatible with older versions
For AGP, all my use cases are well supported with AGP 8 (maybe even lower). I found the important AGP version to be on the app side of things. For library lagging a bit is usually ok
All in all there are a lot of versions at play but the ecosystem is moving fast enough that it shouldn't be too much of an issue if you use latest versions
a
thank you . will try that .
k
@abu naser I am trying to build test KMP library for iOS and Android platforms If you achieved it please guide me. I am good in Kotlin Multiplatform.