I managed to get it working via Koin.
For future reference for people, these are my dependencies:
koin = "4.0.0-RC1"
koin-compose = "1.2.0-Beta5"
koin-core = { group = "io.insert-koin", name = "koin-core", version.ref = "koin" }
koin-compose = { group = "io.insert-koin", name = "koin-compose", version.ref = "koin" }
koin-compose-viewmodel = { group = "io.insert-koin", name = "koin-compose-viewmodel", version.ref = "koin-compose" }
The problem that I initially had was that for
koin-compose-viewmodel
I was using
4.0.0-RC1
too, though it seems like that has a bug currently causing the crash. This version combination does work correctly. Also don't forget to
startKoin
in your
Main.kt
of your JVM/Desktop application