// noinspection GradleCompatible
repositories {
    google()
    jcenter()
    maven { url 'https://jitpack.io' }
}

apply plugin: 'com.android.application'

android {
    compileSdkVersion 28
    buildToolsVersion '28.0.3'

    defaultConfig {
        applicationId "ru.orangesoftware.financisto"
        minSdkVersion 19
        targetSdkVersion 28
        versionCode 122
        versionName "1.8.3"
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
        multiDexEnabled true
        javaCompileOptions {
            annotationProcessorOptions {
                arguments = [
                        "androidManifestFile": "$projectDir/src/main/AndroidManifest.xml".toString()
                ]
            }
        }
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }

    dexOptions {
        javaMaxHeapSize "2g"
    }

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    lintOptions {
        checkReleaseBuilds false
        abortOnError false
    }

    testOptions {
        unitTests {
            returnDefaultValues = true
            includeAndroidResources = true
        }
    }

    sourceSets {
        test {
            resources.srcDirs += ['src/test/resources']
        }
    }

    packagingOptions {
        exclude 'META-INF/DEPENDENCIES.txt'
        exclude 'META-INF/LICENSE'
        exclude 'META-INF/LICENSE.txt'
        exclude 'META-INF/NOTICE.txt'
        exclude 'META-INF/NOTICE'
        exclude 'META-INF/LICENSE'
        exclude 'META-INF/DEPENDENCIES'
        exclude 'META-INF/notice.txt'
        exclude 'META-INF/license.txt'
        exclude 'META-INF/dependencies.txt'
        exclude 'META-INF/LGPL2.1'
    }
}

def AAVersion = '4.6.0'

dependencies {
    implementation 'androidx.legacy:legacy-support-v4:1.0.0'
    implementation 'androidx.appcompat:appcompat:1.1.0'
    implementation 'androidx.multidex:multidex:2.0.1'

    implementation "com.google.android.gms:play-services-base:11.0.2"
    implementation "com.google.android.gms:play-services-drive:11.0.2"
    implementation "com.google.android.gms:play-services-plus:11.0.2"

    annotationProcessor "org.androidannotations:androidannotations:$AAVersion"
    implementation "org.androidannotations:androidannotations-api:$AAVersion"

    implementation 'com.google.code.gson:gson:2.8.5'
    implementation 'net.sf.trove4j:trove4j:3.0.3'

    implementation 'com.dropbox.core:dropbox-core-sdk:3.0.8'
    implementation 'com.squareup.okhttp3:okhttp:3.10.0'
    implementation 'com.squareup.okio:okio:1.14.0'
    implementation 'org.greenrobot:eventbus:3.1.1'
    implementation 'com.wdullaer:materialdatetimepicker:3.6.4'
    implementation 'commons-io:commons-io:2.5'
    implementation 'com.mtramin:rxfingerprint:2.2.1'
    implementation 'io.reactivex.rxjava2:rxjava:2.2.2'
    implementation 'io.reactivex.rxjava2:rxandroid:2.1.0'
    implementation 'org.reactivestreams:reactive-streams:1.0.2'
    implementation 'com.mlsdev.rximagepicker:library:2.1.5'
    implementation 'com.github.bumptech.glide:glide:4.10.0'

    implementation fileTree(include: '**/*.jar', dir: 'libs')

    testImplementation 'junit:junit:4.12'
    testImplementation 'androidx.test:core:1.2.0'
    testImplementation 'org.robolectric:robolectric:4.2.1'
}