apply plugin: 'com.android.library'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-android'
apply from: "$project.rootDir/upload.gradle"

android {
    compileSdkVersion rootProject.ext.targetSDK

    defaultConfig {
        minSdkVersion rootProject.ext.minSDK
        targetSdkVersion rootProject.ext.targetSDK

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
        consumerProguardFiles 'consumer-rules.pro'
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
            android.libraryVariants.all { variant ->
                variant.outputs.all {
                    outputFileName = "${ARTIFACT_ID}-release.aar"
                }
            }
        }
    }

    testOptions {
        unitTests.includeAndroidResources = true
    }

}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.aar', '*.jar'], exclude: [])
    testImplementation "org.robolectric:robolectric:${rootProject.ext.roboletric}"
    testImplementation "junit:junit:${rootProject.ext.junit}"
    testImplementation "androidx.test:core:${rootProject.ext.testCore}"
    androidTestImplementation "androidx.test.ext:junit:${rootProject.ext.extJunit}"
    androidTestImplementation "androidx.test.espresso:espresso-core:${rootProject.ext.espresso}"
    implementation "androidx.appcompat:appcompat:${rootProject.ext.appCompat}"
}