blob: 63ee78d68f229bafa8666935de86da66ed27d7a7 [file] [log] [blame]
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
apply from: '../config/quality/quality.gradle'
android {
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion
defaultConfig {
applicationId "org.apache.fineract"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.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/java'
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'
}
}
dependencies {
def daggerCompiler = "com.google.dagger:dagger-compiler:$rootProject.daggerVersion"
def jUnit = "junit:junit:4.12"
def mockito = "org.mockito:mockito-core:$rootProject.mockitoVersion"
// Support Dependencies
compile "com.android.support:appcompat-v7:$rootProject.supportLibraryVersion"
compile "com.android.support:design:$rootProject.supportLibraryVersion"
compile "com.android.support:recyclerview-v7:$rootProject.supportLibraryVersion"
compile "com.android.support:cardview-v7:$rootProject.supportLibraryVersion"
compile "com.android.support.test.espresso:espresso-idling-resource:$rootProject.espressoVersion"
compile "com.android.support:support-annotations:$rootProject.supportLibraryVersion"
// Rx Dependencies
compile "io.reactivex.rxjava2:rxjava:$rootProject.rxjavaVersion"
compile "io.reactivex.rxjava2:rxandroid:$rootProject.rxandroidVersion"
// Square Dependencies
compile "com.squareup.retrofit2:retrofit:$rootProject.retrofitVersion"
compile "com.squareup.retrofit2:converter-gson:$rootProject.retrofitVersion"
compile "com.squareup.retrofit2:converter-scalars:$rootProject.retrofitVersion"
compile "com.squareup.retrofit2:adapter-rxjava2:$rootProject.retrofitVersion"
compile "com.squareup.okhttp3:okhttp:$rootProject.okHttp3Version"
compile "com.squareup.okhttp3:logging-interceptor:$rootProject.okHttp3Version"
//Glide for loading the images
compile 'com.github.bumptech.glide:glide:3.7.0'
compile 'de.hdodenhof:circleimageview:2.1.0'
// Dagger 2 Dependencies
compile "com.google.dagger:dagger:$rootProject.daggerVersion"
provided 'org.glassfish:javax.annotation:10.0-b28' //Required by Dagger2
annotationProcessor daggerCompiler
testAnnotationProcessor daggerCompiler
androidTestAnnotationProcessor daggerCompiler
// ButterKnife Dependencies
compile "com.jakewharton:butterknife:$rootProject.butterKnifeVersion"
annotationProcessor "com.jakewharton:butterknife-compiler:$rootProject.butterKnifeVersion"
// Fabric Crashlytics Dependencies
compile('com.crashlytics.sdk.android:crashlytics:2.6.8@aar') {
transitive = true;
}
//Sticky header RecyclerView
compile 'org.zakariya.stickyheaders:stickyheaders:0.7.6'
//Material Stepper UI library
compile 'com.stepstone.stepper:material-stepper:3.3.0'
// Instrumentation test dependencies
androidTestCompile jUnit
androidTestCompile mockito
androidTestCompile "org.mockito:mockito-android:$rootProject.mockitoVersion"
androidTestCompile "com.android.support:support-annotations:$rootProject.supportLibraryVersion"
androidTestCompile("com.android.support.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'
}
androidTestCompile "com.android.support.test.espresso:espresso-core:$rootProject.espressoVersion"
androidTestCompile "com.android.support.test:runner:$rootProject.runnerVersion"
androidTestCompile "com.android.support.test:rules:$rootProject.rulesVersion"
// Unit tests dependencies
testCompile jUnit
testCompile mockito
testCompile "com.android.support:support-annotations:$rootProject.supportLibraryVersion"
testCompile "org.hamcrest:hamcrest-core:$rootProject.hamcrestVersion"
testCompile "org.hamcrest:hamcrest-library:$rootProject.hamcrestVersion"
testCompile "org.hamcrest:hamcrest-integration:$rootProject.hamcrestVersion"
testCompile 'org.robolectric:robolectric: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:23.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()}"
}
}