-
Notifications
You must be signed in to change notification settings - Fork 26
/
robolectric.gradle
50 lines (42 loc) · 1.81 KB
/
robolectric.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
android.testOptions.unitTests.all {
// configure the set of classes for JUnit tests
include project.hasProperty("testFilter") ? "**/*${project.ext.testFilter}*Test.class" : '**/*Test.class'
exclude '**/espresso/**/*.class'
// configure max heap size of the test JVM
maxHeapSize = '2048m'
// configure the test JVM arguments
jvmArgs '-XX:MaxPermSize=512m', '-XX:-UseSplitVerifier'
// Specify max number of processes (default is 1)
maxParallelForks = 1
// Specify max number of test classes to execute in a test process
// before restarting the process (default is unlimited)
forkEvery = 150
// configure whether failing tests should fail the build
ignoreFailures false
testLogging {
events 'passed', 'skipped', 'failed', 'standardOut', 'standardError'
}
}
ext {
assertjVersion = '1.1.1'
robolectricVersion = '3.0'
}
dependencies {
testCompile "org.robolectric:robolectric:$robolectricVersion",
"org.robolectric:shadows-support-v4:$robolectricVersion",
'org.mockito:mockito-core:1.9.5+',
'junit:junit:4.12'
testCompile("com.squareup.assertj:assertj-android:$assertjVersion") {
exclude group: 'com.android.support', module: 'support-annotations'
}
testCompile("com.squareup.assertj:assertj-android-support-v4:$assertjVersion") {
exclude group: 'com.android.support', module: 'support-annotations'
exclude group: 'com.android.support', module: 'support-v4'
// see robolectric/robolectric#1633
}
testCompile("com.squareup.assertj:assertj-android-appcompat-v7:$assertjVersion") {
exclude group: 'com.android.support', module: 'support-annotations'
exclude group: 'com.android.support', module: 'appcompat-v7'
// see robolectric/robolectric#1633
}
}