/
build.gradle.kts
95 lines (81 loc) · 3.05 KB
/
build.gradle.kts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
@file:Suppress("UnstableApiUsage")
plugins {
id("com.android.library")
kotlin("android")
id("de.mannodermaus.android-junit5")
}
val androidBuild = property("androidBuild").toString().toBoolean()
android {
compileSdk = 34
namespace = "okhttp.android.test"
defaultConfig {
minSdk = 21
// Make sure to use the AndroidJUnitRunner (or a sub-class) in order to hook in the JUnit 5 Test Builder
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
testInstrumentationRunnerArguments += mapOf(
"runnerBuilder" to "de.mannodermaus.junit5.AndroidJUnit5Builder",
"notPackage" to "org.bouncycastle",
"configurationParameters" to "junit.jupiter.extensions.autodetection.enabled=true"
)
}
if (androidBuild) {
sourceSets["androidTest"].java.srcDirs(
"../okhttp-brotli/src/test/java",
"../okhttp-dnsoverhttps/src/test/java",
"../okhttp-logging-interceptor/src/test/java",
"../okhttp-sse/src/test/java"
)
}
compileOptions {
targetCompatibility(JavaVersion.VERSION_11)
sourceCompatibility(JavaVersion.VERSION_11)
}
testOptions {
targetSdk = 34
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_11.toString()
}
// issue merging due to conflict with httpclient and something else
packagingOptions.resources.excludes += setOf(
"META-INF/DEPENDENCIES",
"META-INF/LICENSE.md",
"META-INF/LICENSE-notice.md",
"README.txt",
"org/bouncycastle/LICENSE"
)
}
dependencies {
implementation(libs.kotlin.reflect)
implementation(libs.playservices.safetynet)
implementation(projects.okhttp)
implementation(projects.okhttpAndroid)
androidTestImplementation(projects.okhttpTestingSupport) {
exclude("org.openjsse", "openjsse")
exclude("org.conscrypt", "conscrypt-openjdk-uber")
exclude("software.amazon.cryptools", "AmazonCorrettoCryptoProvider")
}
androidTestImplementation(libs.assertk)
androidTestImplementation(libs.bouncycastle.bcprov)
androidTestImplementation(libs.bouncycastle.bctls)
androidTestImplementation(libs.conscrypt.android)
androidTestImplementation(projects.mockwebserver3Junit5)
androidTestImplementation(projects.okhttpBrotli)
androidTestImplementation(projects.okhttpDnsoverhttps)
androidTestImplementation(projects.loggingInterceptor)
androidTestImplementation(projects.okhttpSse)
androidTestImplementation(projects.okhttpTls)
androidTestImplementation(projects.okhttpAndroid)
androidTestImplementation(libs.androidx.junit)
androidTestImplementation(libs.androidx.espresso.core)
androidTestImplementation(libs.httpClient5)
androidTestImplementation(libs.kotlin.test.common)
androidTestImplementation(libs.kotlin.test.junit)
androidTestImplementation(libs.squareup.moshi)
androidTestImplementation(libs.squareup.moshi.kotlin)
androidTestImplementation(libs.squareup.okio.fakefilesystem)
androidTestImplementation(libs.androidx.test.runner)
androidTestImplementation(libs.junit.jupiter.api)
androidTestImplementation(libs.junit5android.core)
androidTestRuntimeOnly(libs.junit5android.runner)
}