-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Expand file tree
/
Copy pathbuild.gradle
More file actions
70 lines (57 loc) · 2.35 KB
/
build.gradle
File metadata and controls
70 lines (57 loc) · 2.35 KB
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
apply plugin: 'com.android.application'
apply plugin: 'realm-android'
android {
namespace 'io.realm.examples.unittesting'
compileSdkVersion rootProject.sdkVersion
buildToolsVersion rootProject.buildTools
defaultConfig {
applicationId 'io.realm.examples.unittesting'
targetSdkVersion rootProject.sdkVersion
minSdkVersion rootProject.minSdkVersion
versionCode 1
versionName "1.0"
// Needed for jUnit4 support.
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled true
signingConfig signingConfigs.debug
}
debug {
minifyEnabled false
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
testOptions {
unitTests {
includeAndroidResources = true
}
}
}
dependencies {
implementation 'com.android.support:appcompat-v7:27.1.1'
testImplementation 'io.reactivex.rxjava2:rxjava:2.1.13'
// Testing
testImplementation 'junit:junit:4.13.2'
// Seen quite many issues when bumping from 3.8 (due to AndroidX)
// 4.1 seems to be the only one not exibiting these. Some of the relevant links
// - https://github.com/robolectric/robolectric/issues/4015
// - https://github.com/roObolectric/robolectric/issues/5082
// - https://stackoverflow.com/questions/29072148/mockito-with-robolectric-classcastexception-occurred-when-creating-the-proxy/36720803
testImplementation "org.robolectric:robolectric:4.6.1"
testImplementation "org.mockito:mockito-core:3.3.3"
testImplementation 'org.robolectric:shadows-support-v4:3.2'
testImplementation "org.powermock:powermock-module-junit4:2.0.9"
testImplementation "org.powermock:powermock-module-junit4-rule:2.0.9"
testImplementation "org.powermock:powermock-api-mockito2:2.0.9"
testImplementation "org.powermock:powermock-classloading-xstream:2.0.9"
androidTestImplementation 'com.android.support.test:runner:1.0.2'
// Set this dependency to use JUnit 4 rules
androidTestImplementation 'com.android.support.test:rules:1.0.2'
// Set this dependency to build and run Espresso tests
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}