Quick question for mobile client: can I have Ktor ...
# ktor
p
Quick question for mobile client: can I have Ktor version 1.6.7 on a library gradle dependency and Ktor version 2.0.3 on my main project? I have tried it and I realised that those two are not working well together (e.g I got java.lang.NoClassDefFoundError: Failed resolution of: Lio/ktor/client/features/ClientRequestException).
b
As a rule of thumb, different major versions of the libraries don't play nice together due to permitted breaking changes. Looks like you hit a bottleneck here. I recommend sticking with 1.x for now until your dependencies upgrade to 2.x
Gradle usually resolves to the highest version of the library in the dependency tree, that's why you get NoClassDef exception from your dependency that expects ktor 1.x but gets 2.x
p
I see, that was my perspective too. I was hoping for a workaround 🙂
b
Fork the lib and bump the dependency yourself? 😀
😀 1