-
Notifications
You must be signed in to change notification settings - Fork 66
/
Copy pathbuild.gradle
195 lines (163 loc) · 7.96 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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
apply plugin: 'com.android.application'
apply from: '../config/quality/quality.gradle'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
apply plugin: 'com.google.android.gms.oss-licenses-plugin'
android {
compileSdkVersion 28
defaultConfig {
applicationId "org.mifos.mobile.cn"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
}
buildTypes {
debug {
versionNameSuffix " Debug"
debuggable true
}
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
sourceSets {
def commonTestDir = 'src/commonTest/kotlin'
main.java.srcDirs += 'src/main/kotlin'
androidTest {
java.srcDir commonTestDir
}
test {
java.srcDir commonTestDir
}
}
// Always show the result of every unit test, even if it passes.
testOptions.unitTests.all {
testLogging {
events 'passed', 'skipped', 'failed', 'standardOut', 'standardError'
}
}
lintOptions {
abortOnError false
warning 'InvalidPackage'
}
packagingOptions {
exclude 'META-INF/rxjava.properties'
}
repositories {
maven { url 'https://maven.fabric.io/public' }
maven { url 'https://maven.google.com' }
maven { url "https://www.jitpack.io" }
}
androidExtensions {
experimental = true
}
}
dependencies {
def daggerCompiler = "com.google.dagger:dagger-compiler:$rootProject.daggerVersion"
def jUnit = "junit:junit:4.12"
def mockito = "org.mockito:mockito-core:$rootProject.mockitoVersion"
implementation fileTree(dir: 'libs', include: ['*.jar'])
// Kotlin Dependencies
implementation "org.jetbrains.kotlin:kotlin-stdlib:$rootProject.kotlinVersion"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$rootProject.kotlinVersion"
// Support Dependencies
implementation "androidx.appcompat:appcompat:$rootProject.supportLibraryVersion"
implementation "com.google.android.material:material:$rootProject.supportLibraryVersion"
implementation "androidx.recyclerview:recyclerview:$rootProject.supportLibraryVersion"
implementation "androidx.cardview:cardview:$rootProject.supportLibraryVersion"
implementation "androidx.test.espresso:espresso-idling-resource:$rootProject.espressoVersion"
implementation "androidx.annotation:annotation:$rootProject.supportLibraryVersion"
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation "com.mifos.mobile:mifos-passcode:$rootProject.passcodeLibraryVersion"
// Rx Dependencies
implementation "io.reactivex.rxjava2:rxjava:$rootProject.rxjavaVersion"
implementation "io.reactivex.rxjava2:rxandroid:$rootProject.rxandroidVersion"
implementation "io.reactivex.rxjava2:rxkotlin:$rootProject.rxKotlinVersion"
// Timber for logging
implementation 'com.jakewharton.timber:timber:4.5.1'
// Dagger 2 Dependencies
implementation "com.google.dagger:dagger:$rootProject.daggerVersion"
compileOnly "org.glassfish:javax.annotation:10.0-b28" //Required by Dagger2
kapt daggerCompiler
// Square Dependencies
implementation "com.squareup.retrofit2:retrofit:$rootProject.retrofitVersion"
implementation "com.squareup.retrofit2:converter-gson:$rootProject.retrofitVersion"
implementation "com.squareup.retrofit2:converter-scalars:$rootProject.retrofitVersion"
implementation "com.squareup.retrofit2:adapter-rxjava2:$rootProject.retrofitVersion"
implementation "com.squareup.okhttp3:okhttp:$rootProject.okHttp3Version"
implementation "com.squareup.okhttp3:logging-interceptor:$rootProject.okHttp3Version"
// For debugging the local database
implementation 'com.facebook.stetho:stetho:1.5.0'
// Sweet Error for error handling
implementation 'com.github.therajanmaurya:Sweet-Error:1.0.0'
//Stepper version
implementation "com.stepstone.stepper:material-stepper:$rootProject.stepperVersion"
//Sticky header RecyclerView
implementation "org.zakariya.stickyheaders:stickyheaders:$sticyHeaderVersion"
// Glide for Image Loading
implementation 'com.github.bumptech.glide:glide:4.8.0'
kapt 'com.github.bumptech.glide:compiler:4.8.0'
//dbFlow for database
kapt "com.github.Raizlabs.DBFlow:dbflow-processor:$rootProject.dbFlowVersion"
implementation "com.github.Raizlabs.DBFlow:dbflow-core:$rootProject.dbFlowVersion"
implementation "com.github.Raizlabs.DBFlow:dbflow:$rootProject.dbFlowVersion"
implementation "com.github.Raizlabs.DBFlow:dbflow-kotlinextensions:$rootProject.dbFlowVersion"
implementation "com.github.Raizlabs.DBFlow:dbflow-rx2:$rootProject.dbFlowVersion"
implementation "com.github.Raizlabs.DBFlow:dbflow-rx2-kotlinextensions:$rootProject.dbFlowVersion"
//OpenSource Licences
implementation "com.google.android.gms:play-services-oss-licenses:17.1.0"
// Instrumentation test dependencies
androidTestImplementation jUnit
androidTestImplementation mockito
androidTestImplementation "org.mockito:mockito-android:$rootProject.mockitoVersion"
androidTestImplementation "androidx.annotation:annotation:$rootProject.supportLibraryVersion"
androidTestImplementation("androidx.test.espresso:espresso-contrib:$rootProject.espressoVersion") {
exclude group: 'com.android.support', module: 'appcompat'
exclude group: 'com.android.support', module: 'support-v4'
exclude group: 'com.android.support', module: 'recyclerview-v7'
exclude group: 'com.android.support', module: 'design'
exclude group: 'com.android.support', module: 'support-annotations'
}
androidTestImplementation "androidx.test.espresso:espresso-core:$rootProject.espressoVersion"
androidTestImplementation "androidx.test:runner:$rootProject.runnerVersion"
androidTestImplementation "androidx.test:rules:$rootProject.rulesVersion"
// Unit tests dependencies
testImplementation jUnit
testImplementation mockito
testImplementation "androidx.annotation:annotation:$rootProject.supportLibraryVersion"
testImplementation "org.hamcrest:hamcrest-core:$rootProject.hamcrestVersion"
testImplementation "org.hamcrest:hamcrest-library:$rootProject.hamcrestVersion"
testImplementation "org.hamcrest:hamcrest-integration:$rootProject.hamcrestVersion"
testImplementation 'org.robolectric:robolectric:3.3.1'
}
// Log out test results to console
tasks.matching { it instanceof Test }.all {
testLogging.events = ["failed", "passed", "skipped"]
}
/*
Resolves dependency versions across test and production APKs, specifically, transitive
dependencies. This is required since Espresso internally has a dependency on support-annotations.
*/
configurations.all {
resolutionStrategy {
force 'com.android.support:support-annotations:27.1.1'
force 'com.google.code.findbugs:jsr305:1.3.9'
}
}
/*
All direct/transitive dependencies shared between your test and production APKs need to be
excluded from the test APK! This is necessary because both APKs will contain the same classes. Not
excluding these dependencies from your test configuration will result in an dex pre-verifier error
at runtime. More info in this tools bug: (https://code.google.com/p/android/issues/detail?id=192497)
*/
configurations.compile.dependencies.each { compileDependency ->
println "Excluding compile dependency: ${compileDependency.getName()}"
configurations.androidTestCompile.dependencies.each { androidTestCompileDependency ->
configurations.androidTestCompile.exclude module: "${compileDependency.getName()}"
}
}