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

android {
    namespace = 'com.frolo.core.ui'
    compileSdkVersion versions.compileSdk

    defaultConfig {
        minSdkVersion versions.minSdk
        targetSdkVersion versions.targetSdk

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

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

kotlin {
    jvmToolchain(buildtools.versions.java.get().toInteger())
}

java {
    toolchain {
        languageVersion.set(JavaLanguageVersion.of(buildtools.versions.java.get()))
    }
}

dependencies {
    implementation deps.support.core
    implementation deps.support.appCompat
    implementation deps.support.fragment
    implementation deps.design.material
    implementation deps.design.palette
    implementation deps.design.flexbox
    implementation deps.rxJava2.rxAndroid

    // Glide
    implementation deps.glide.glide
    kapt deps.glide.compiler

    implementation project(path: ':audio:player:api')
    implementation project(path: ':material-support')
    implementation project(path: ':custom-drawable:squircle')
    implementation project(path: ':utils:ui')
    implementation project(path: ':utils:debug-common')
    implementation project(path: ':utils:threads-common')
    implementation project(path: ':arch-support')
}
