TensorLearn
TensorLearn

Reputation: 27

Unable to import Okhttp tls to kotlin project

I am trying to import OkHttp TLS to be able to use certificates and other OkHttp TLS functionality

my build.gradle.kts looks like this

implementation ("com.squareup.okhttp3:okhttp-tls")

However, gradle is unable to find this module

Could not find com.squareup.okhttp3:okhttp-tls

Unsure if okhttp tls is not imported this way any longer

Upvotes: 1

Views: 2113

Answers (1)

haminoum
haminoum

Reputation: 91

Maybe you want to try the following

implementation("com.squareup.okhttp3:okhttp:4.10.0")

You can take a closer look at the docs

dependencies {
   // define a BOM and its version
   implementation(platform("com.squareup.okhttp3:okhttp-bom:4.10.0"))

   // define any required OkHttp artifacts without version
   implementation("com.squareup.okhttp3:okhttp")
   implementation("com.squareup.okhttp3:logging-interceptor")
}

Upvotes: 3

Related Questions