apply plugin: 'com.android.application'

apply plugin: 'kotlin-android'

apply plugin: 'kotlin-android-extensions'

apply plugin: 'kotlin-kapt'

apply plugin: 'io.objectbox'

android {
    compileSdkVersion 31
    buildToolsVersion "30.0.3"
    defaultConfig {
        applicationId "com.piapps.flashcardpro"
        minSdkVersion 19
        targetSdkVersion 31
        versionCode 37
        versionName "v0.3.7"
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
        vectorDrawables.useSupportLibrary = true
        multiDexEnabled true
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    buildTypes {
        release {
            minifyEnabled true
            shrinkResources true
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
    configurations {
        all {
            exclude module: 'httpclient'
            exclude module: 'commons-logging'
        }
    }
    testOptions {
        unitTests.includeAndroidResources = true
    }
    tasks.withType(Test) {
        testLogging {
            exceptionFormat "full"
            events "started", "skipped", "passed", "failed"
            showStandardStreams true
        }
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
    implementation "androidx.core:core-ktx:1.6.0"
    implementation "androidx.appcompat:appcompat:1.3.1"
    implementation "androidx.recyclerview:recyclerview:1.2.1"
    implementation "com.google.android.material:material:1.4.0"
    implementation "androidx.constraintlayout:constraintlayout:2.1.1"

    // Test
    testImplementation 'androidx.test:core:1.3.0'
    testImplementation 'androidx.test:runner:1.3.0'
    testImplementation 'androidx.test.ext:junit:1.1.2'
    testImplementation 'org.robolectric:robolectric:4.3'
    testImplementation 'org.mockito:mockito-core:1.10.19'
    testImplementation "io.objectbox:objectbox-macos:$objectboxVersion"


    implementation 'com.github.bumptech.glide:glide:4.9.0'
    kapt 'com.github.bumptech.glide:compiler:4.9.0'

    implementation 'com.google.dagger:dagger:2.22.1'
    kapt 'com.google.dagger:dagger-compiler:2.22.1'
    kapt 'com.google.dagger:dagger-android-processor:2.15'
    kapt 'com.google.dagger:dagger-compiler:2.22.1'

    // circle image view
    implementation 'de.hdodenhof:circleimageview:2.1.0'

    // animators
    implementation 'jp.wasabeef:recyclerview-animators:3.0.0'

    // openCSV
    implementation 'com.opencsv:opencsv:4.0'

    // mp android chart
    implementation 'com.github.PhilJay:MPAndroidChart:v3.1.0'

    // crop image
    implementation 'com.isseiaoki:simplecropview:1.1.8'

    // draw
    implementation 'com.rm:freedrawview:1.1.2'

    // color wheel
    implementation 'com.github.QuadFlask:colorpicker:0.0.15'

    implementation project(":layouts")
}
