1plugins {
2    id "net.ltgt.errorprone" version "0.0.13"
3}
4
5new RoboJavaModulePlugin(
6        deploy: true
7).apply(project)
8
9apply plugin: ShadowsPlugin
10
11shadows {
12    packageName "org.robolectric.shadows.httpclient"
13}
14
15configurations {
16    earlyRuntime
17}
18
19dependencies {
20    // Project dependencies
21    compileOnly project(":shadows:framework")
22
23    // Compile dependencies
24    earlyRuntime "org.apache.httpcomponents:httpcore:4.0.1"
25    compile "org.apache.httpcomponents:httpclient:4.0.3"
26    compileOnly(AndroidSdk.LOLLIPOP_MR1.coordinates) { force = true }
27
28    // Testing dependencies
29    testCompile project(":robolectric")
30    testCompile "junit:junit:4.12"
31    testCompile "org.assertj:assertj-core:3.8.0"
32    testCompile "org.mockito:mockito-core:2.5.4"
33    testRuntime AndroidSdk.LOLLIPOP_MR1.coordinates
34}
35
36// httpcore needs to come before android-all on runtime classpath; the gradle IntelliJ plugin
37//   needs the compileClasspath order patched too (bug?)
38sourceSets.main.compileClasspath = configurations.earlyRuntime + sourceSets.main.compileClasspath
39sourceSets.main.runtimeClasspath = configurations.earlyRuntime + sourceSets.main.runtimeClasspath
40
41sourceSets.test.compileClasspath = configurations.earlyRuntime + sourceSets.test.compileClasspath
42sourceSets.test.runtimeClasspath = configurations.earlyRuntime + sourceSets.test.runtimeClasspath