import org.robolectric.gradle.DeployedRoboJavaModulePlugin import org.robolectric.gradle.RoboJavaModulePlugin apply plugin: RoboJavaModulePlugin apply plugin: DeployedRoboJavaModulePlugin apply plugin: ShadowsPlugin shadows { packageName "org.robolectric.shadows.httpclient" sdkCheckMode "OFF" } configurations { earlyRuntime } dependencies { api project(":annotations") api project(":shadowapi") api project(":utils") // We should keep httpclient version for low level API compatibility. earlyRuntime libs.apache.http.core api libs.apache.http.client compileOnly(AndroidSdk.LOLLIPOP_MR1.coordinates) testImplementation project(":robolectric") testImplementation libs.junit4 testImplementation libs.truth testImplementation libs.mockito testImplementation "androidx.test.ext:junit:$axtJunitVersion@aar" testCompileOnly(AndroidSdk.LOLLIPOP_MR1.coordinates) testRuntimeOnly AndroidSdk.S.coordinates } // httpcore needs to come before android-all on runtime classpath; the gradle IntelliJ plugin // needs the compileClasspath order patched too (bug?) sourceSets.main.compileClasspath = configurations.earlyRuntime + sourceSets.main.compileClasspath sourceSets.main.runtimeClasspath = configurations.earlyRuntime + sourceSets.main.runtimeClasspath sourceSets.test.compileClasspath = configurations.earlyRuntime + sourceSets.test.compileClasspath sourceSets.test.runtimeClasspath = configurations.earlyRuntime + sourceSets.test.runtimeClasspath