I’m trying to use two libraries in the same java process:
- Kotlin Scripting 1.3.71
- Kotlinx Coroutines 1.3.5
As I found, classpath has two versions of coroutines:
- From Kotlin Compiler. This is fat jar, which loads some additional classes from itself, for example - Flux, Deferred, etc.
- From Coroutines dependency.
Unfortunately, Kotlin Compiler dependency has injected version of coroutines from 1.2.1. It means, that by default my project has coroutines classes in memory, which have jar version 1.2.1, not 1.3.5.
Question: how it is better to have both libraries in memory? Can I insist loading newer Coroutines (from ClassLoader) without any Kotlin Compiler damage?