plugins {
    id 'com.android.library'
    id 'kotlin-android'
    id 'kotlin-kapt'
    id 'com.github.jk1.dependency-license-report'
    id 'org.jetbrains.kotlin.plugin.compose'
}

android {
    compileSdk rootProject.ext.compileSdkVersion

    namespace = "com.zhangke.framework"

    defaultConfig {
        minSdk rootProject.ext.minSdkVersion
        targetSdk rootProject.ext.targetSdkVersion

        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_17
        targetCompatibility JavaVersion.VERSION_17
    }
    kotlinOptions {
        jvmTarget = '17'
    }

    buildFeatures {
        compose = true
        buildConfig = true
    }
    composeOptions {
        kotlinCompilerExtensionVersion = rootProject.ext.compose_version
        kotlinCompilerVersion = rootProject.ext.kotlin_version
    }
}

dependencies {
    testImplementation 'junit:junit:4.13.2'
    androidTestImplementation 'androidx.test.ext:junit:1.1.3'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'

    implementation compose.material
    implementation compose.material3
    implementation compose.ui

    implementation support.appcompat
    implementation support.'datastore-preferences'
    implementation support.datastore
    implementation support.material
    implementation support.fragment
    implementation support.'fragment-ktx'

    implementation arch.lifecycle.process
    kapt           arch.lifecycle.compiler
    implementation arch.lifecycle.'common-java8'

    implementation thirdparty.okhttp3
    implementation thirdparty.'okhttp3-logging'
    implementation thirdparty.retrofit
    implementation thirdparty.'retrofit-converter-gson'
    implementation thirdparty.gson
    implementation thirdparty.rxjava3
    implementation thirdparty.rxandroid3
    implementation thirdparty.coil
    implementation thirdparty.'coil-compose'
    implementation thirdparty.'coil-gif'

    implementation kotlin_libs.stdlib
    implementation coroutine.core
    implementation coroutine.android
}