import io.getstream.butterfly.Configuration
import io.getstream.butterfly.Dependencies

plugins {
    id 'com.android.library'
    id 'org.jetbrains.kotlin.android'
    id 'org.jetbrains.dokka'
    id 'binary-compatibility-validator'
}

ext {
    PUBLISH_GROUP_ID = Configuration.artifactGroup
    PUBLISH_ARTIFACT_ID = 'butterfly-livedata'
    PUBLISH_VERSION = rootVersionName
}

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

android {
    compileSdkVersion Configuration.compileSdk
    defaultConfig {
        minSdkVersion Configuration.minSdk
        targetSdkVersion Configuration.targetSdk
    }

    buildFeatures {
        buildConfig false
    }

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    kotlinOptions {
        jvmTarget = '1.8'
    }

    lintOptions {
        abortOnError false
    }
}

tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
    kotlinOptions.freeCompilerArgs += ["-Xexplicit-api=strict"]
}

dependencies {
    api project(":butterfly")
    api Dependencies.androidxLiveData

    implementation Dependencies.androidxAppcompat
}

apply from: "$rootDir/spotless.gradle"