blob: 5dbcc83975be5a1deb8218bb606a21965e8a6e88 [file] [log] [blame]
apply plugin: 'com.android.application'
apply plugin: 'kotlin-kapt'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
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 "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
multiDexEnabled 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
}
main {
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'
}
//for @parcelize extension
androidExtensions {
experimental = true
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8
}
}
dependencies {
def daggerCompiler = "com.google.dagger:dagger-compiler:$rootProject.daggerVersion"
def jUnit = "junit:junit:$rootProject.junitVersion"
def mockito = "org.mockito:mockito-core:$rootProject.mockitoVersion"
// Support Dependencies
implementation "androidx.appcompat:appcompat:$supportLibraryVersion"
implementation "com.google.android.material:material:$supportLibraryVersion"
implementation "androidx.recyclerview:recyclerview:$supportLibraryVersion"
implementation "androidx.cardview:cardview:$supportLibraryVersion"
implementation "androidx.test.espresso:espresso-idling-resource:$espressoVersion"
implementation "androidx.annotation:annotation:$supportLibraryVersion"
implementation "androidx.lifecycle:lifecycle-extensions:$lifecycleExtension"
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
kapt "androidx.lifecycle:lifecycle-compiler:$lifecycleExtension"
// Kotlin Dependencies
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlinVersion"
//android-job
implementation "com.evernote:android-job:$androidJobVersion"
implementation "com.github.therajanmaurya:Sweet-Error:$sweetErrorVersion"
implementation "androidx.legacy:legacy-support-v4:$supportLibraryVersion"
kapt "com.github.Raizlabs.DBFlow:dbflow-processor:$dbflowVersion"
implementation "com.github.Raizlabs.DBFlow:dbflow-core:$dbflowVersion"
implementation "com.github.Raizlabs.DBFlow:dbflow:$dbflowVersion"
implementation "com.github.Raizlabs.DBFlow:dbflow-rx2:$dbflowVersion"
// Rx Dependencies
implementation "io.reactivex.rxjava2:rxjava:$rxjavaVersion"
implementation "io.reactivex.rxjava2:rxandroid:$rxandroidVersion"
implementation "io.reactivex.rxjava2:rxkotlin:$rxKotlinVersion"
// Square Dependencies
implementation "com.squareup.retrofit2:retrofit:$retrofitVersion"
implementation "com.squareup.retrofit2:converter-gson:$retrofitVersion"
implementation "com.squareup.retrofit2:converter-scalars:$retrofitVersion"
implementation "com.squareup.retrofit2:adapter-rxjava2:$retrofitVersion"
implementation "com.squareup.okhttp3:okhttp:$okHttp3Version"
implementation "com.squareup.okhttp3:logging-interceptor:$okHttp3Version"
//Glide for loading the images
implementation "com.github.bumptech.glide:glide:$glideVersion"
implementation "de.hdodenhof:circleimageview:$circleImageviewVersion"
// Dagger 2 Dependencies
implementation "com.google.dagger:dagger:$daggerVersion"
compileOnly 'org.glassfish:javax.annotation:10.0-b28' //Required by Dagger2
kapt daggerCompiler
// testkapt daggerCompiler
// androidTestkapt daggerCompiler
// ButterKnife Dependencies
implementation "com.jakewharton:butterknife:$butterKnifeVersion"
kapt "com.jakewharton:butterknife-compiler:$butterKnifeVersion"
// Fabric Crashlytics Dependencies
implementation('com.crashlytics.sdk.android:crashlytics:2.6.8@aar') {
transitive = true
}
//Sticky header RecyclerView
implementation "org.zakariya.stickyheaders:stickyheaders:$sticyHeaderVersion"
// Compressor for Image Compression
implementation "id.zelory:compressor:$compressorVersion"
//Material Stepper UI library
implementation "com.stepstone.stepper:material-stepper:$materialStepperVersion"
implementation "com.mifos.mobile:mifos-passcode:$mifosPasscodeVersion"
//Easy Validation Library
implementation "com.wajahatkarim3.easyvalidation:easyvalidation-core:$easyValidationVersion"
//Coroutines
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$version_kotlin_coroutines"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$version_kotlin_coroutines"
//couchbase
implementation "com.couchbase.lite:couchbase-lite-android:$couchbase"
// Instrumentation test dependencies
androidTestImplementation jUnit
androidTestImplementation mockito
androidTestImplementation "org.mockito:mockito-android:$mockitoVersion"
androidTestImplementation "androidx.annotation:annotation:$supportLibraryVersion"
androidTestImplementation("androidx.test.espresso:espresso-contrib:$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:$espressoVersion"
androidTestImplementation "androidx.test:runner:$runnerVersion"
androidTestImplementation "androidx.test:rules:$rulesVersion"
androidTestImplementation "androidx.test.ext:junit:$extJunit"
androidTestImplementation "androidx.test.espresso:espresso-core:$espressoCore"
androidTestImplementation "androidx.test.espresso:espresso-contrib: $espressonContribute"
// Unit tests dependencies
testImplementation jUnit
testImplementation mockito
testImplementation "androidx.annotation:annotation:$supportLibraryVersion"
testImplementation "org.hamcrest:hamcrest-core:$hamcrestVersion"
testImplementation "org.hamcrest:hamcrest-library:$hamcrestVersion"
testImplementation "org.hamcrest:hamcrest-integration:$hamcrestVersion"
testImplementation "org.robolectric:robolectric:$roboElectricVersion"
}
// 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()}"
}
}
repositories {
mavenCentral()
}