https://kotlinlang.org logo
Title
l

Leon K

08/18/2019, 1:38 PM
hey, i have a problem with the ktor client auth feature not being available altough it is installed in the gradle dependency block. I used the regular ktor-project wizard in intelliJ, and added the basic auth feature on the client side, but when i try to
install(Auth)
in an HttpClient, the class doesn't seem to exist. also, the dependency that is installed by the wizard is
compile "io.ktor:ktor-client-auth-basic:$ktor_version"
, whilst in the ktor doc (https://ktor.io/clients/http-client/features/auth.html) the mentioned dependency is
"io.ktor:ktor-client-auth:$ktor_version"
... any ideas?
d

Dominaezzz

08/18/2019, 1:41 PM
Is this a multiplatform project? Single module?
l

Leon K

08/18/2019, 1:47 PM
single module, Jvm only
d

Dominaezzz

08/18/2019, 1:49 PM
Are you confident the dependency is being resolved by gradle?
(It'll be in the gradle sync ouput)
l

Leon K

08/18/2019, 1:51 PM
it seems like it, everything finishes successfully. how would i check that? (when i press gradle sync, i only get
Configure Successfull in 1s
)
d

Dominaezzz

08/18/2019, 1:52 PM
Ah, gradle hasn't complained.
l

Leon K

08/18/2019, 1:53 PM
nope, IntelliJ just doesn't show it and it won't compile when i try to compile anyway
i have tried restarting IntelliJ, and clean-building the gradle stuff
t

tseisel

08/19/2019, 6:50 AM
Had the same problem a couple days ago. It seems that
ktor-client-auth
contains multiplatform declarations, so you need to include
ktor-client-auth-jvm
in order to use it on the JVM (the same happens with
ktor-client-logging
). Maybe this should be made explicit in the docs ?
✔️ 3