blob: 065cda13296e81461d1a34cab9ca5c69e2c0b33f [file] [log] [blame]
apply plugin: org.robolectric.gradle.RoboJavaModulePlugin
apply plugin: org.robolectric.gradle.DeployedRoboJavaModulePlugin
apply plugin: ShadowsPlugin
shadows {
packageName "org.robolectric.shadows.httpclient"
sdkCheckMode "OFF"
}
configurations {
earlyRuntime
}
dependencies {
api project(":annotations")
api project(":shadowapi")
api project(":utils")
earlyRuntime "org.apache.httpcomponents:httpcore:4.0.1"
api "org.apache.httpcomponents:httpclient:4.0.3"
compileOnly(AndroidSdk.LOLLIPOP_MR1.coordinates) { force = true }
testImplementation project(":robolectric")
testImplementation "junit:junit:4.12"
testImplementation "com.google.truth:truth:1.0.1"
testImplementation "org.mockito:mockito-core:2.5.4"
testImplementation "androidx.test.ext:junit:1.1.2-rc03"
testCompileOnly(AndroidSdk.LOLLIPOP_MR1.coordinates) { force = true }
testRuntime AndroidSdk.LOLLIPOP_MR1.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