-
Notifications
You must be signed in to change notification settings - Fork 1.4k
/
build.gradle
executable file
·104 lines (89 loc) · 3.92 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
import org.robolectric.gradle.DeployedRoboJavaModulePlugin
import org.robolectric.gradle.RoboJavaModulePlugin
apply plugin: RoboJavaModulePlugin
apply plugin: 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:$errorproneVersion"
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.68"
compileOnly "com.google.code.findbugs:jsr305:3.0.2"
compileOnly AndroidSdk.MAX_SDK.coordinates
compileOnly "junit:junit:${junitVersion}"
implementation "androidx.test:monitor:$axtVersion"
implementation "androidx.test.espresso:espresso-idling-resource:3.4.0"
testImplementation "junit:junit:${junitVersion}"
testImplementation "com.google.truth:truth:${truthVersion}"
testImplementation "com.google.truth.extensions:truth-java8-extension:${truthVersion}"
testImplementation "org.mockito:mockito-core:${mockitoVersion}"
testImplementation "org.hamcrest:hamcrest-junit:2.0.0.0"
testImplementation "androidx.test:core:$axtVersion"
testImplementation "androidx.test.ext:junit:$axtJunitVersion"
testImplementation "androidx.test.ext:truth:$axtVersion"
testImplementation "androidx.test:runner:$axtVersion"
testImplementation("com.google.guava:guava:$guavaJREVersion")
testCompileOnly AndroidSdk.MAX_SDK.coordinates // compile against latest Android SDK
testRuntimeOnly 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#",
]
}