blob: 4b8fed3109c33c15db8cb7b4492e0211bee2bde0 [file] [log] [blame]
apply plugin: org.robolectric.gradle.RoboJavaModulePlugin
apply plugin: org.robolectric.gradle.DeployedRoboJavaModulePlugin
processResources {
filesMatching("**/robolectric-version.properties") {
filter { String line ->
return line.replaceAll(/\$\{project.version\}/, project.version)
}
}
}
configurations {
shadow
}
project.sourceSets.test.compileClasspath += configurations.shadow
dependencies {
annotationProcessor "com.google.auto.service:auto-service:1.0-rc6"
annotationProcessor "com.google.errorprone:error_prone_core:2.3.4"
api project(":annotations")
api project(":junit")
api project(":pluginapi")
api project(":resources")
api project(":sandbox")
api project(":utils")
api project(":utils:reflector")
api project(":plugins:maven-dependency-resolver")
api "javax.inject:javax.inject:1"
compileOnly "com.google.auto.service:auto-service-annotations:1.0-rc6"
api "javax.annotation:javax.annotation-api:1.3.2"
// We need to have shadows-framework.jar on the runtime system classpath so ServiceLoader
// can find its META-INF/services/org.robolectric.shadows.ShadowAdapter.
api project(":shadows:framework")
api "org.bouncycastle:bcprov-jdk15on:1.65"
compileOnly "com.google.code.findbugs:jsr305:3.0.2"
compileOnly AndroidSdk.MAX_SDK.coordinates
compileOnly "junit:junit:4.12"
compile "androidx.test:monitor:1.3.0-rc03"
testImplementation "junit:junit:4.12"
testImplementation "com.google.truth:truth:0.45"
testImplementation "com.google.truth.extensions:truth-java8-extension:0.45"
testImplementation "org.mockito:mockito-core:2.5.4"
testImplementation "org.hamcrest:hamcrest-junit:2.0.0.0"
testImplementation "androidx.test:core:1.3.0-rc03"
testImplementation "androidx.test.ext:junit:1.1.2-rc03"
testImplementation "androidx.test.ext:truth:1.3.0-rc03"
testImplementation "androidx.test:runner:1.3.0-rc03"
testImplementation("com.google.guava:guava:27.0.1-jre")
testCompileOnly AndroidSdk.MAX_SDK.coordinates // compile against latest Android SDK
testRuntime AndroidSdk.MAX_SDK.coordinates // run against whatever this JDK supports
}
test {
if (project.hasProperty('maxParallelForks'))
maxParallelForks = project.maxParallelForks as int
if (project.hasProperty('forkEvery'))
forkEvery = project.forkEvery as int
}
project.apply plugin: CheckApiChangesPlugin
checkApiChanges {
from = [
"org.robolectric:robolectric:${apiCompatVersion}@jar",
"org.robolectric:annotations:${apiCompatVersion}@jar",
"org.robolectric:junit:${apiCompatVersion}@jar",
"org.robolectric:resources:${apiCompatVersion}@jar",
"org.robolectric:sandbox:${apiCompatVersion}@jar",
"org.robolectric:utils:${apiCompatVersion}@jar",
"org.robolectric:shadowapi:${apiCompatVersion}@jar",
"org.robolectric:shadows-framework:${apiCompatVersion}@jar",
]
to = [
project(":robolectric"),
project(":annotations"),
project(":junit"),
project(":resources"),
project(":sandbox"),
project(":shadows:framework"),
project(":utils"),
project(":shadowapi"),
]
entryPoints += "org.robolectric.RobolectricTestRunner"
expectedChanges = [
"^org.robolectric.util.ActivityController#",
"^org.robolectric.util.ComponentController#",
"^org.robolectric.util.ContentProviderController#",
"^org.robolectric.util.FragmentController#",
"^org.robolectric.util.IntentServiceController#",
"^org.robolectric.util.ServiceController#",
]
}