blob: 610d12547709a8562967b7f69d9ac05f38317141 [file] [log] [blame]
new RoboJavaModulePlugin(
deploy: true
).apply(project)
apply plugin: ShadowsPlugin
shadows {
packageName "org.robolectric.shadows.httpclient"
}
configurations {
earlyRuntime
}
dependencies {
compileOnly project(":shadows:framework")
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:0.39"
testImplementation "org.mockito:mockito-core:2.5.4"
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