https://kotlinlang.org logo
Title
a

aleksey.tomin

05/19/2020, 1:53 PM
Hello for all, I try to use ktor-client in
native
in .kts file
dependencies {
                implementation("io.ktor:ktor-client-core:$ktorVersion")
                implementation("io.ktor:ktor-client-core-macosx64:$ktorVersion")
                implementation("io.ktor:ktor-client-core-native:$ktorVersion")

                implementation("io.ktor:ktor-client-curl:$ktorVersion")

                implementation("io.ktor:ktor-http-cio:$ktorVersion")
                implementation("io.ktor:ktor-client-cio:$ktorVersion")
                implementation("io.ktor:ktor-http-cio-native:$ktorVersion")
                implementation("io.ktor:ktor-http-cio-macosx64:$ktorVersion")
            }
It works with CUrl:
client = HttpClient(io.ktor.client.engine.curl.Curl)
But doesn’t works with CIO:
client = HttpClient(io.ktor.client.engine.cio.CIO)
> Task :compileKotlinMac FAILED
e: /.../CurlClient.kt: (12, 51): Unresolved reference: cio
What have I to do?
👀 1
e

e5l

05/19/2020, 1:54 PM
Hi @aleksey.tomin, could you share your kts setup?
a

aleksey.tomin

05/19/2020, 1:56 PM
Sory,
build.gradle.kts
file?
e

e5l

05/19/2020, 1:59 PM
Upd. Got the config. What is your version of ktor?
The
CIO
engine has no native implementation in public release. It will be available in the next public beta.
a

aleksey.tomin

05/19/2020, 2:03 PM
I’m using 1.3.2 Have you got a
M
builds and repo?
e

e5l

05/19/2020, 2:04 PM
Nope, we're going to publish it with kotlin
1.4-M2
a

aleksey.tomin

05/19/2020, 2:14 PM
e

e5l

05/19/2020, 2:15 PM
Sure, will do after the release(It's in the jvm section for now)
a

aleksey.tomin

05/19/2020, 2:18 PM
Ok. I’m wating CIO client and server 👍