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


android {
    namespace 'com.bjzc.bhzhgd'
    compileSdk 35
    defaultConfig {
        applicationId "com.bjzc.bhzhgd"
        minSdk 24
        targetSdk 35
        versionCode 1
        versionName "1.0.0"
        multiDexEnabled true
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
        //每个应用拥有不同的authorities，防止相同的在同一个手机上无法同时安装
        resValue "string", "authorities", applicationId
        resourceConfigurations += ['zh', 'en', 'hdpi']
    }
    buildFeatures {
        viewBinding = true
    }
    signingConfigs {
        release {
            keyAlias 'key0'
            storeFile file('../key/keystore1')
            storePassword 'abc123123'
            keyPassword 'abc123123'
            v1SigningEnabled true   //是否开启V1签名
            v2SigningEnabled true   //是否开启V2签名
        }
    }
    /*  keypassword:abc123123   alias key0*/
    buildTypes {
        debug {
            minifyEnabled false
        }
        release {
            lintOptions {
                checkReleaseBuilds false
                abortOnError false
            }
            minifyEnabled false //开启代码混淆，防止反编译查看源代码
            zipAlignEnabled true // 对齐zip
            debuggable false // 是否debug
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
            //修改生成的apk名字
            android.applicationVariants.all { variant ->
                variant.outputs.all {
                    outputFileName = "bhzhgdapp.apk"
                }
            }
            signingConfig signingConfigs.release // 打包签名信息
        }
    }
    sourceSets {
        main {
            jniLibs.srcDirs = ['libs']
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_21
        targetCompatibility JavaVersion.VERSION_21
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])

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



    //第三方库自动布局
    implementation project(':autolayout')
    //网络请求模块
    implementation project(':nohttp')
    //第三方数据库封装，巡检，点检用到
    implementation project(':litepal')
    //图片展示模块
    implementation project(':matisse')
    //图片展示模块
    implementation project(':luban')


    //网络请求
    implementation libs.logging.interceptor
    implementation libs.com.squareup.retrofit2.retrofit3
    implementation libs.com.squareup.retrofit2.converter.gson
    implementation libs.okhttp
    implementation libs.cn.hutool.hutool.all


    implementation libs.com.github.philjay.mpandroidchart6
    implementation libs.circleimageview
    implementation libs.com.github.chrisbanes.photoview.library6
    implementation libs.me.leolin.shortcutbadger
    implementation libs.cn.jzvd.jiaozivideoplayer6
    implementation libs.com.github.chrisbanes.photoview6
    implementation libs.com.davemorrissey.labs.subsampling.scale.image.view6
    implementation libs.com.github.huangyanbin.smarttable6
    implementation libs.androidx.multidex
    implementation libs.recyclerview.v140
    implementation libs.xuexiangjys.xui
    implementation libs.baoyachi.stepview
    implementation libs.appupdate
    implementation libs.com.tencent.bugly.crashreport

    implementation libs.picture.library
    implementation libs.photoviewer
    implementation libs.eventbus
    //第三方库图片异步加载
    implementation libs.com.github.bumptech.glide.glide
    annotationProcessor libs.compiler
    //mqtt
    implementation libs.eclipse.org.eclipse.paho.client.mqttv3
    implementation libs.eclipse.org.eclipse.paho.android.service
    implementation libs.org.bouncycastle.bcpkix.jdk15on
    implementation libs.commons.codec
    //本地广播
    implementation libs.androidx.localbroadcastmanager
    //第三方浏览器
    implementation libs.io.github.justson.agentweb.core3
    implementation libs.cymchad.baserecyclerviewadapterhelper

    configurations {
        all*.exclude group: 'com.google.code.gson'
    }
}
