| plugins { |
| //id "net.ltgt.errorprone" version "0.0.11" |
| } |
| |
| new RoboJavaModulePlugin( |
| deploy: true |
| ).apply(project) |
| |
| apply plugin: ShadowsPlugin |
| |
| shadows { |
| packageName "org.robolectric.shadows.support.v4" |
| } |
| |
| configurations { |
| earlyTestRuntime |
| } |
| |
| dependencies { |
| // Project dependencies |
| compileOnly project(":robolectric") |
| compileOnly project(":shadows:framework") |
| |
| // Compile dependencies |
| compileOnly AndroidSdk.MAX_SDK.coordinates |
| compileOnly "com.android.support:support-v4:26.0.0-alpha1" |
| compileOnly "com.android.support:support-compat:26.0.0-alpha1" |
| compileOnly "com.android.support:support-core-ui:26.0.0-alpha1" |
| compileOnly "com.android.support:support-core-utils:26.0.0-alpha1" |
| compileOnly "com.android.support:support-fragment:26.0.0-alpha1" |
| |
| // Testing dependencies |
| testCompile project(":robolectric") |
| testCompile "junit:junit:4.12" |
| testCompile "org.hamcrest:hamcrest-junit:2.0.0.0" |
| testCompile "org.assertj:assertj-core:3.8.0" |
| testCompile "org.mockito:mockito-core:2.5.4" |
| |
| earlyTestRuntime "org.hamcrest:hamcrest-junit:2.0.0.0" |
| testRuntime AndroidSdk.MAX_SDK_FOR_THIS_JDK.coordinates |
| testRuntime "com.android.support:support-v4:26.0.0-alpha1" |
| testRuntime "com.android.support:support-compat:26.0.0-alpha1" |
| testRuntime "com.android.support:support-core-ui:26.0.0-alpha1" |
| testRuntime "com.android.support:support-core-utils:26.0.0-alpha1" |
| testRuntime "com.android.support:support-fragment:26.0.0-alpha1" |
| } |
| |
| // change local artifact name to match dependencies |
| install { |
| repositories.mavenInstaller { |
| pom.artifactId = 'shadows-support-v4' |
| } |
| } |
| |
| // hamcrest needs to come before junit on runtime classpath; the gradle IntelliJ plugin |
| // needs the compileClasspath order patched too (bug?) |
| sourceSets.test.compileClasspath = configurations.earlyTestRuntime + sourceSets.test.compileClasspath |
| sourceSets.test.runtimeClasspath = configurations.earlyTestRuntime + sourceSets.test.runtimeClasspath |