plugins {
    alias(libs.plugins.android.application)
    alias(libs.plugins.kotlin.android)

    id("com.google.gms.google-services")
    id("com.google.firebase.crashlytics")
}

android {
    namespace = "com.base.scanqr"
    compileSdk = 34

    defaultConfig {
        applicationId = "com.base.scanqr"
        minSdk = 24
        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_1_8
        targetCompatibility = JavaVersion.VERSION_1_8
    }
    kotlinOptions {
        jvmTarget = "1.8"
    }

    buildFeatures {
        viewBinding = true
        buildConfig = true
    }

}

dependencies {

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


    //网络请求
    implementation("com.google.code.gson:gson:2.11.0")

    // 语种切换框架：https://github.com/getActivity/MultiLanguages
    implementation("com.github.getActivity:MultiLanguages:9.3")
    // 沉浸式状态栏，基础依赖包，必须要依赖
    api(libs.immersionbar)
    // 沉浸式状态栏kotlin扩展（可选）
    api(libs.immersionbar.ktx)


    //solar 归因
    implementation("com.reyun.solar.engine.oversea:solar-engine-core:1.2.8.3")


    //第三方UI控件
    implementation("io.github.cymchad:BaseRecyclerViewAdapterHelper4:4.1.4")


    //机器学习二维码扫描
    implementation("com.google.mlkit:barcode-scanning:17.3.0")

    //相机
    val cameraxVersion = "1.2.2"
    implementation("androidx.camera:camera-core:${cameraxVersion}")
    implementation("androidx.camera:camera-camera2:${cameraxVersion}")
    implementation("androidx.camera:camera-view:${cameraxVersion}")
    implementation("androidx.camera:camera-lifecycle:${cameraxVersion}")


    val zxing = "3.5.0"
    implementation("com.google.zxing:core:$zxing")
//    implementation("com.google.zxing:android-integration:$zxing")
//    implementation("com.google.zxing:zxing-android-embedded:$zxing")

}

