# library-development

Baptiste Mesta

07/16/2019, 7:02 AM
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
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


07/16/2019, 7:06 AM
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).

Baptiste Mesta

07/16/2019, 8:27 AM
Thank you! Yep I was expecting that. I'll look into how compatibility works for differents std-lib versions