plugins {
    id "com.android.application"
    id "kotlin-android"
}

android {
    final sdk = rootProject.ext.sdk

    buildFeatures {
        viewBinding = true
    }

    defaultConfig {
        compileSdk sdk.compileSdk
        minSdkVersion sdk.minSdk
        targetSdkVersion sdk.targetSdk

        applicationId "com.esafirm.imagepicker.sample"

        versionCode 1
        versionName "1.0"

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }

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

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    kotlinOptions {
        jvmTarget = JavaVersion.VERSION_1_8.toString()
    }
    namespace 'com.esafirm.sample'
}

dependencies {
    implementation "com.github.bumptech.glide:glide:4.14.2"
    implementation "androidx.appcompat:appcompat:1.5.1"

    /* Development */
    implementation project(':imagepicker')

    debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.9.1'
    implementation "androidx.core:core-ktx:$core_ktx_version"

    /* UI Test */
    final espressoVersion = '3.5.0'
    final runnerVersion = '1.5.1'
    androidTestImplementation "androidx.test.espresso:espresso-core:$espressoVersion"
    androidTestImplementation "androidx.test.espresso:espresso-contrib:$espressoVersion"
    androidTestImplementation "androidx.test:runner:$runnerVersion"
    androidTestImplementation "androidx.test:rules:1.5.0"
    androidTestImplementation 'androidx.test.ext:junit-ktx:1.1.4'
    androidTestImplementation "androidx.test:core:1.5.0"
    androidTestImplementation('com.adevinta.android:barista:4.2.0') {
        exclude group: 'org.jetbrains.kotlin'
        exclude group: 'org.hamcrest'
    }
}
