plugins {
    alias(libs.plugins.androidApplication)
    alias(libs.plugins.jetbrainsKotlinAndroid)
}

android {
    namespace = "com.kaixed.kchat"
    compileSdk = 34

    viewBinding {
        enable = true
    }

    defaultConfig {
        applicationId = "com.kaixed.kchat"
        minSdk = 28
        targetSdk = 34
        versionCode = 1
        versionName = "1.0"

        testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"

    }

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

    kotlinOptions {
        jvmTarget = "17"
    }
}

dependencies {

    implementation(libs.androidx.core.ktx)
    implementation(libs.appcompat)
    implementation(libs.material)
    implementation(libs.activity)
    implementation(libs.constraintlayout)
    testImplementation(libs.junit)
    androidTestImplementation(libs.ext.junit)
    androidTestImplementation(libs.espresso.core)

    implementation(libs.okhttp)
    implementation(libs.mmkv)
    implementation(libs.gson)

    implementation(libs.window)

    implementation(libs.emoji2)

    implementation(libs.preference)

    //noinspection UseTomlInstead
    debugImplementation("io.objectbox:objectbox-android-objectbrowser:4.0.2")
    //noinspection UseTomlInstead
    releaseImplementation("io.objectbox:objectbox-android:4.0.2")

    implementation(libs.glide)

//    ksp ("cn.therouter:apt:1.2.2")
//    implementation ("cn.therouter:router:1.2.2")
    implementation("com.airbnb.android:lottie:6.5.2")


}

apply(plugin = "io.objectbox")
