plugins {
    id "com.android.library"
    id "kotlin-android"
    id "kotlin-parcelize"
}

android {
    final sdk = rootProject.ext.sdk

    compileSdkVersion sdk.compileSdk

    defaultConfig {
        minSdkVersion sdk.minSdk
        targetSdkVersion sdk.targetSdk
    }

    buildFeatures {
        viewBinding true
    }

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

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    lint {
        abortOnError false
    }

    testOptions {
        unitTests.all {
            useJUnitPlatform()
        }
    }

    resourcePrefix "ef_"
    namespace 'com.esafirm.imagepicker'
}

tasks.register("sourcesJar", Jar) {
    from android.sourceSets.main.java.srcDirs
    archiveClassifier.set('sources')
}

artifacts {
    archives sourcesJar
}

dependencies {
    implementation "com.github.bumptech.glide:glide:4.14.2"
    implementation 'androidx.recyclerview:recyclerview:1.2.1'

    implementation 'androidx.appcompat:appcompat:1.5.1'

    implementation "androidx.core:core-ktx:$core_ktx_version"

    testImplementation platform("org.junit:junit-bom:5.9.1")
    testImplementation "org.junit.jupiter:junit-jupiter"
    testImplementation 'com.natpryce:hamkrest:1.8.0.1'
}
