xref: /aosp_15_r20/external/robolectric/shadows/httpclient/build.gradle.kts (revision e6ba16074e6af37d123cb567d575f496bf0a58ee)

<lambda>null1 plugins {
2   alias(libs.plugins.robolectric.deployed.java.module)
3   alias(libs.plugins.robolectric.java.module)
4   alias(libs.plugins.robolectric.shadows)
5 }
6 
<lambda>null7 shadows {
8   packageName = "org.robolectric.shadows.httpclient"
9   sdkCheckMode = "OFF"
10 }
11 
12 val earlyRuntime = configurations.create("earlyRuntime")
13 val axtJunitVersion: String by rootProject.extra
14 
<lambda>null15 dependencies {
16   api(project(":annotations"))
17   api(project(":shadowapi"))
18   api(project(":utils"))
19 
20   // We should keep httpclient version for low level API compatibility.
21   earlyRuntime(libs.apache.http.core)
22   api(libs.apache.http.client)
23   compileOnly(AndroidSdk.LOLLIPOP_MR1.coordinates)
24 
25   testImplementation(project(":robolectric"))
26   testImplementation(libs.junit4)
27   testImplementation(libs.truth)
28   testImplementation(libs.mockito)
29   testImplementation("androidx.test.ext:junit:$axtJunitVersion@aar")
30 
31   testCompileOnly(AndroidSdk.LOLLIPOP_MR1.coordinates)
32   testRuntimeOnly(AndroidSdk.S.coordinates)
33 }
34 
35 // httpcore needs to come before android-all on runtime classpath; the gradle IntelliJ plugin
36 //   needs the compileClasspath order patched too (bug?)
37 val mainSourceSet = sourceSets.getByName("main")
38 
39 mainSourceSet.compileClasspath = earlyRuntime + mainSourceSet.compileClasspath
40 
41 mainSourceSet.runtimeClasspath = earlyRuntime + mainSourceSet.runtimeClasspath
42 
43 val testSourceSet = sourceSets.getByName("test")
44 
45 testSourceSet.compileClasspath = earlyRuntime + testSourceSet.compileClasspath
46 
47 testSourceSet.runtimeClasspath = earlyRuntime + testSourceSet.runtimeClasspath
48