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