plugins {
    id 'com.android.library'
    id 'kotlin-android'
}

ext {
    PUBLISH_GROUP_ID = 'com.alexstyl'
    PUBLISH_VERSION = libraryVersionName
    PUBLISH_ARTIFACT_ID = 'warden'
}

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

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

    defaultConfig {
        minSdkVersion androidMinSdkVersion
        targetSdkVersion androidCompileSdkVersion
        versionCode libraryVersionCode
        versionName libraryVersionName

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
        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 "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutinesVersion"
    implementation "androidx.core:core-ktx:$coreVersion"
    implementation 'androidx.activity:activity-ktx:1.4.0'
}