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

android {
    namespace "com.tencent.qcloud.tuikit.timcommon"
    compileSdk libs.versions.compileSdk.get().toInteger()

    defaultConfig {
        minSdk libs.versions.minSdk.get().toInteger()
        targetSdk libs.versions.targetSdk.get().toInteger()

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
        consumerProguardFiles "consumer-rules.pro"
        ndk {
            abiFilters "armeabi-v7a"
            abiFilters "arm64-v8a"
        }
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_17
        targetCompatibility JavaVersion.VERSION_17
    }

    sourceSets {
        main {
            res.srcDirs += "src/main/res-light"
            res.srcDirs += "src/main/res-lively"
            res.srcDirs += "src/main/res-serious"
        }
    }
    kotlinOptions {
        jvmTarget = JavaVersion.VERSION_17.majorVersion
    }
}

dependencies {
    //kotlin
    implementation libs.kotlin.stdlib
    /*plugin-build-Begin

    compileOnly fileTree(include: ['*.jar','*.aar'], dir: '../../../../tuikit/android/libs')

    plugin-build-End*/

    def projects = this.rootProject.getAllprojects().stream().map { project -> project.name }.collect()
    api projects.contains("tuicore") ? project(':tuicore') : "com.tencent.liteav.tuikit:tuicore:8.7.7201"

    implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
    implementation 'com.google.android.material:material:1.4.0'
    implementation 'com.google.code.gson:gson:2.9.1'
    implementation 'androidx.appcompat:appcompat:1.3.1'
    implementation 'com.github.bumptech.glide:glide:4.12.0'
    implementation 'androidx.recyclerview:recyclerview:1.2.1'
    implementation 'androidx.viewpager2:viewpager2:1.0.0'
    annotationProcessor 'com.google.auto.service:auto-service:1.1.1'

}

