I am trying to implement kotlin backend with mongo DB and JWT, all requried dependencies are added as
ktor_version=2.1.0
kmongo_version=4.7.0
commons_codec_version=1.15
kotlin_version=1.6.21
logback_version=1.2.11
kotlin.code.style=official
But unable to get import for .coroutine
KMongo.createClient(connectionString = "....").coroutine.getDatabaseName(dbName)
error is still there even though the import is set manually
import org.litote.kmongo.coroutine.coroutine
Gradle dependencies:
implementation("io.ktor:ktor-server-call-logging-jvm:$ktor_version")
implementation("io.ktor:ktor-server-content-negotiation-jvm:$ktor_version")
implementation("io.ktor:ktor-server-core-jvm:$ktor_version")
implementation("io.ktor:ktor-serialization-kotlinx-json-jvm:$ktor_version")
implementation("io.ktor:ktor-server-auth-jvm:$ktor_version")
implementation("io.ktor:ktor-server-auth-jwt-jvm:$ktor_version")
implementation("io.ktor:ktor-server-netty-jvm:$ktor_version")
implementation("ch.qos.logback:logback-classic:$logback_version")
testImplementation("io.ktor:ktor-server-tests-jvm:$ktor_version")
testImplementation("org.jetbrains.kotlin:kotlin-test-junit:$kotlin_version")
implementation("org.litote.kmongo:kmongo:$kmongo_version")
implementation("org.litote.kmongo:kmongo-coroutine:$kmongo_version")
implementation("commons-codec:commons-codec:$commons_codec_version")