I have a dependency that requires a specific Kotli...
# compose-desktop
l
I have a dependency that requires a specific Kotlin version while compose requires a different one. Is there a way to solve this or did I just loose the dependency lottery? 🤔
k
For now you lost the lottery
l
😢 Thanks for verifying.
m
Can you split your UI module and other module requiring a different Kotlin so, that you build/publish it localy and consume it from Compose UI module as maven dependency?
o
Not that bad, actually, just split modules.
And what is another dependency, btw?
m
@olonho Naive question, you mean like you can have different gradle modules using a different compiler versions in the same project?
o
As with any other Gradle plugin, I presume
🤔 1
Kotlin compiler is just a Gradle plugin
🙏 1
l
Hmm, sounds interesting. I figured out that it is actually the coroutines versions that are conflicting. One dependency requires
1.4.3
while compose for desktop requires
1.5.0
. Would the propposed fix still work?
e
you can use a Kotlin 1.4 dependency in a Kotlin 1.5 project just fine
compiler plugins are an issue but JVM/stdlib is covered by https://kotlinlang.org/docs/components-stability.html
l
you can use a Kotlin 1.4 dependency in a Kotlin 1.5 project just fine
I was expecting that as well actually. Maybe I need to investigate a bit further. 🙂 Thanks for your help anyways.
e
I didn't see you mentioned coroutines earlier. but those are also covered under the stability document, unless the library uses experimental parts of the api
l
Thanks! I do not see any deprecated API being used but I guess I need to look a bit more closely.