plugins {
    id 'com.android.library'
    id 'org.jetbrains.kotlin.android'
}

android {
    compileSdkVersion buildConfig.compileSdkVersion

    defaultConfig {
        minSdkVersion buildConfig.minSdkVersion

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

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

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    kotlinOptions {
        jvmTarget = '1.8'
        freeCompilerArgs += ['-module-name', "datastore-ktx"]
    }
}

dependencies {
    api "androidx.datastore:datastore-preferences:$datastoreVersion"
    api "androidx.lifecycle:lifecycle-livedata-ktx:$lifecycleVersion"
    implementation "androidx.startup:startup-runtime:$startupVersion"
    androidTestImplementation "androidx.test.ext:junit:$junitExtVersion"
    androidTestImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-test:1.6.4"
    androidTestImplementation "androidx.test.espresso:espresso-core:$espressoVersion"
}