okhttp
55 строк · 1.6 Кб
1plugins {
2id("com.android.library")
3kotlin("android")
4}
5
6android {
7compileSdk = 34
8
9namespace = "okhttp.android.regression"
10
11defaultConfig {
12minSdk = 21
13targetSdk = 34
14
15// Make sure to use the AndroidJUnitRunner (or a sub-class) in order to hook in the JUnit 5 Test Builder
16testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
17testInstrumentationRunnerArguments += mapOf(
18"notClass" to "org.conscrypt.KitKatPlatformOpenSSLSocketImplAdapter,org.bouncycastle.pqc.crypto.qtesla.QTeslaKeyEncodingTests"
19)
20}
21
22compileOptions {
23targetCompatibility(JavaVersion.VERSION_11)
24sourceCompatibility(JavaVersion.VERSION_11)
25}
26
27kotlinOptions {
28jvmTarget = JavaVersion.VERSION_11.toString()
29}
30
31// issue merging due to conflict with httpclient and something else
32packagingOptions.resources.excludes += setOf(
33"META-INF/DEPENDENCIES"
34)
35}
36
37
38dependencies {
39val okhttpLegacyVersion = "3.12.12"
40
41implementation(libs.kotlin.reflect)
42implementation(libs.playservices.safetynet)
43implementation("com.squareup.okhttp3:okhttp:${okhttpLegacyVersion}")
44implementation("com.squareup.okhttp3:okhttp-tls:${okhttpLegacyVersion}") {
45exclude("org.bouncycastle")
46}
47androidTestImplementation("com.squareup.okhttp3:mockwebserver:${okhttpLegacyVersion}")
48androidTestImplementation(libs.bouncycastle.bcprov)
49androidTestImplementation(libs.bouncycastle.bctls)
50androidTestImplementation(libs.androidx.junit)
51androidTestImplementation(libs.androidx.espresso.core)
52androidTestImplementation(libs.httpClient5)
53androidTestImplementation(libs.squareup.moshi)
54androidTestImplementation(libs.squareup.moshi.kotlin)
55}
56