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

android {
    namespace = "com.example.defenseapplication"
    compileSdk {
        version = release(36) {
            minorApiLevel = 1
        }
    }

    defaultConfig {
        applicationId = "com.example.defenseapplication"
        minSdk = 24
        targetSdk = 36
        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_11
        targetCompatibility = JavaVersion.VERSION_11
    }
    buildFeatures {
        viewBinding=true
    }
}

dependencies {
    implementation(libs.androidx.core.ktx)
    implementation(libs.androidx.appcompat)
    implementation(libs.material)
    implementation(libs.androidx.activity)
    implementation(libs.androidx.constraintlayout)
    implementation(libs.firebase.crashlytics.buildtools)
    implementation(libs.androidx.ui.test)
    implementation(libs.androidx.recyclerview)
    testImplementation(libs.junit)
    androidTestImplementation(libs.androidx.junit)
    androidTestImplementation(libs.androidx.espresso.core)
    // 添加阿里云移动推送核心SDK
    implementation("com.aliyun.ams:alicloud-android-push:3.8.2")
    implementation("com.aliyun.dpa:oss-android-sdk:2.9.21")
    implementation("de.hdodenhof:circleimageview:3.1.0")
    // Retrofit
    implementation("com.squareup.retrofit2:retrofit:2.9.0")
    // Gson 转换器
    implementation("com.squareup.retrofit2:converter-gson:2.9.0")
    // OkHttp（Retrofit 会自动依赖 OkHttp，但显式指定版本也可以）
    implementation("com.squareup.okhttp3:okhttp:4.12.0")
    implementation("com.github.bumptech.glide:okhttp3-integration:4.11.0@aar")

    // OkHttp 日志拦截器
    implementation("com.squareup.okhttp3:logging-interceptor:4.12.0")
    implementation("com.blankj:utilcodex:1.31.1")

    // Kotlin 协程
    implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3")

    // CameraX 用于相机预览
    implementation("androidx.camera:camera-camera2:1.3.0")
    implementation("androidx.camera:camera-lifecycle:1.3.0")
    implementation("androidx.camera:camera-view:1.3.0")
    // Google ML Kit 人脸检测
    implementation("com.google.mlkit:face-detection:16.1.5")
    // 图形绘制库（绘制人脸框）
    implementation("com.github.bumptech.glide:glide:4.15.1")
    //Glide 依赖
    implementation("com.github.bumptech.glide:glide:4.16.0")
    // ZXing 二维码扫描库
    implementation("com.google.zxing:core:3.5.2")
    // ExoPlayer 核心库
    implementation("androidx.media3:media3-exoplayer:1.9.0")
    // ExoPlayer UI组件库，提供PlayerView等
    implementation("androidx.media3:media3-ui:1.9.0")
    // ExoPlayer 通用库
    implementation("androidx.media3:media3-common:1.9.0")
    // 基础依赖包，必须要依赖
    implementation("com.geyifeng.immersionbar:immersionbar:3.2.2")
    // kotlin扩展（可选）
    implementation("com.geyifeng.immersionbar:immersionbar-ktx:3.2.2")
    implementation("com.wdullaer:materialdatetimepicker:4.2.3") // 经典稳定
    implementation("androidx.core:core-ktx:1.12.0")
    // Android-PickerView 时间选择器
    implementation("com.contrarywind:Android-PickerView:4.1.9")
    //二维码三方库
    implementation("com.github.maning0303:MNMLKitScanner:V1.0.4")
    implementation("com.google.mlkit:barcode-scanning:17.0.2")
    implementation("androidx.camera:camera-core:1.0.2")
    implementation("androidx.camera:camera-camera2:1.0.2")
    implementation("androidx.camera:camera-lifecycle:1.0.2")
    implementation("androidx.camera:camera-view:1.0.0-alpha25")
    //上拉刷新下拉加载
    implementation("androidx.swiperefreshlayout:swiperefreshlayout:1.1.0")
    implementation("com.yanzhenjie.recyclerview:x:1.3.2")
    //Android-PickerView-时间弹窗
    implementation("com.contrarywind:Android-PickerView:4.1.9")

}