blob: ce9fdfe6ae3a944465f18e856951dfbd94af0135 [file] [log] [blame]
import org.robolectric.gradle.DeployedRoboJavaModulePlugin
import org.robolectric.gradle.RoboJavaModulePlugin
apply plugin: RoboJavaModulePlugin
apply plugin: DeployedRoboJavaModulePlugin
apply plugin: ShadowsPlugin
shadows {
packageName "org.robolectric.shadows.support.v4"
sdkCheckMode "OFF"
}
configurations {
earlyTestRuntime
}
test {
systemProperty "robolectric.resourcesMode", "binary"
}
def supportLibraryVersions = "28.0.0"
dependencies {
compileOnly project(":robolectric")
compileOnly project(":shadows:framework")
compileOnly AndroidSdk.MAX_SDK.coordinates
compileOnly "com.android.support:support-annotations:${supportLibraryVersions}"
compileOnly "com.android.support:support-v4:${supportLibraryVersions}"
compileOnly "com.android.support:support-compat:${supportLibraryVersions}"
compileOnly "com.android.support:support-core-ui:${supportLibraryVersions}"
compileOnly "com.android.support:support-core-utils:${supportLibraryVersions}"
compileOnly "com.android.support:support-fragment:${supportLibraryVersions}"
compileOnly "com.android.support:support-media-compat:${supportLibraryVersions}"
testCompileOnly AndroidSdk.MAX_SDK.coordinates
testCompileOnly "com.android.support:support-annotations:${supportLibraryVersions}"
testCompileOnly "com.android.support:support-v4:${supportLibraryVersions}"
testCompileOnly "com.android.support:support-compat:${supportLibraryVersions}"
testCompileOnly "com.android.support:support-core-ui:${supportLibraryVersions}"
testCompileOnly "com.android.support:support-core-utils:${supportLibraryVersions}"
testCompileOnly "com.android.support:support-fragment:${supportLibraryVersions}"
testCompileOnly "com.android.support:support-media-compat:${supportLibraryVersions}"
testImplementation project(":robolectric")
testImplementation "androidx.test.ext:junit:$axtJunitVersion"
testImplementation "junit:junit:${junitVersion}"
testImplementation "org.hamcrest:hamcrest-junit:2.0.0.0"
testImplementation "com.google.truth:truth:${truthVersion}"
testImplementation "org.mockito:mockito-core:${mockitoVersion}"
earlyTestRuntime "org.hamcrest:hamcrest-junit:2.0.0.0"
testRuntimeOnly AndroidSdk.MAX_SDK.coordinates
testRuntimeOnly "com.android.support:support-v4:${supportLibraryVersions}"
testRuntimeOnly "com.android.support:support-compat:${supportLibraryVersions}"
testRuntimeOnly "com.android.support:support-core-ui:${supportLibraryVersions}"
testRuntimeOnly "com.android.support:support-core-utils:${supportLibraryVersions}"
testRuntimeOnly "com.android.support:support-fragment:${supportLibraryVersions}"
testRuntimeOnly "com.android.support:support-media-compat:${supportLibraryVersions}"
}
// 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