apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'

version = "$MATERIAL_PREFERENCE_VERSION"
archivesBaseName = "$POM_ARTIFACT_ID"

android {
    compileSdkVersion rootProject.ext.compileSdkVersion

    defaultConfig {
        minSdkVersion rootProject.ext.minSdkVersion
        targetSdkVersion rootProject.ext.targetSdkVersion
        versionCode rootProject.ext.appVersionCode
        versionName version
        consumerProguardFiles 'proguard-rules.pro'
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    lintOptions {
        abortOnError false
    }
}

dependencies {
    api 'androidx.appcompat:appcompat:1.5.1'
    api 'com.google.android.material:material:1.7.0'
    api 'androidx.documentfile:documentfile:1.0.1'
    api 'androidx.cardview:cardview:1.0.0'

    api 'com.wdullaer:materialdatetimepicker:4.2.3'
    api "com.afollestad.material-dialogs:core:$dialogVersion"
    api "com.afollestad.material-dialogs:files:$dialogVersion"
    api "com.afollestad.material-dialogs:color:$dialogVersion"
    api "com.anggrayudi:materialpreference-api:$PROCESSOR_VERSION"
    compileOnly project(':annotation')

    api "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutinesVersion"
    api "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutinesVersion"

    api "com.anggrayudi:storage:1.5.1"
//    api("com.anggrayudi:storage:1.5.1-SNAPSHOT") { changing = true }
}

configurations.all {
    // Check for updates every build
    resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
}
