Search code examples
javakotlinkotlinx.coroutines

Can I use a library built with Kotlin coroutines in plain java project?


I am planning to build a library which uses Kotlin coroutines to make the HTTP calls to REST services using retrofit2. The final output jar will include all the retrofit and Kotlin coroutines dependencies, can we use this final jar in plain java projects?


Solution

  • Yes. You can. You may want to have interface adopted to java guidelines, but there is no technical restriction that prevent it.