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

ext {
    PUBLISH_GROUP_ID = 'com.alexstyl'
    PUBLISH_VERSION = libraryVersionName
    PUBLISH_ARTIFACT_ID = 'contactstore-coroutines'
}

apply from: "${rootProject.projectDir}/scripts/publish-module.gradle"

android {
    kotlinOptions {
        jvmTarget = javaVersion
        freeCompilerArgs = [
                "-Xexplicit-api=strict"
        ]
    }
    compileSdkVersion androidCompileSdkVersion

    defaultConfig {
        minSdkVersion androidMinSdkVersion
        targetSdkVersion androidCompileSdkVersion
        versionCode libraryVersionCode
        versionName libraryVersionName

        consumerProguardFiles "consumer-rules.pro"
    }

    buildTypes {
        release {
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
    compileOptions {
        sourceCompatibility javaVersion
        targetCompatibility javaVersion
    }
    kotlinOptions {
        jvmTarget = javaVersion
    }
}

dependencies {
    implementation project(':library')
    implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutinesVersion"
    testImplementation "junit:junit:$junitVersion"
    testImplementation "org.assertj:assertj-core:$assertjVersion"
    testImplementation 'app.cash.turbine:turbine:0.7.0'
}