Hello everyone. I’m providing a java library and I...
# library-development
b
Hello everyone. I’m providing a java library and I’d like to use kotlin instead of java to develop it. Apart from “Calling Kotlin from Java” from the documentation, I did not find much ressources on the impact on client using libraries developed in kotlin in a Java only environment. I know that spring boot is providing some kotlin extension with the
kotlin-stdlib
dependency as Optional. But if I were to to use kotlin to develop the library itself what would be the consequences for people using it regarding e.g. compatibilities on kotlin-stdlib versions. Is there a way to avoid any dependencies and keep a “pure java” library?
👍 3
a
You probably could not develop in kotlin without kotlin stdlib. It is Java-compatible, but you really need it. Also if you want full Java compatibility, you won't be able to fully embrace some of kotlin finer features like coroutines (you can use them, but not call suspended function from Java).
b
Thank you! Yep I was expecting that. I'll look into how compatibility works for differents std-lib versions