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

android {
    namespace 'com.rehome.bhdxj'
    compileSdk 35
    defaultConfig {
        applicationId "com.rehome.bhdxj"
        minSdk 24
        targetSdk 35
        versionCode 111
        versionName "1.1.1"
        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签名
        }
    }
    buildTypes {
        debug {
            minifyEnabled false
        }
        release {
            lintOptions {
                checkReleaseBuilds false
                abortOnError false
            }
            minifyEnabled false
            debuggable false // 是否debug
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
            //修改生成的apk名字
            android.applicationVariants.all { variant ->
                variant.outputs.all {
                    outputFileName = "DJ_APP.apk"
                }
            }
            signingConfig signingConfigs.release // 打包签名信息
        }
    }
    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 'com.zhy:autolayout:1.4.5'
//    implementation 'com.yolanda.nohttp:nohttp:1.0.5'
//    implementation 'org.litepal.android:core:1.5.1'

    //第三方库自动布局
    implementation project(':autolayout')
    //网络请求模块
    implementation project(':nohttp')
    //第三方数据库封装，巡检，点检用到
    implementation project(':litepal')
    //XUI框架
    implementation project(':xui_lib')
    //smarttable 框架
    implementation project(':form')

    implementation libs.logging.interceptor
    implementation libs.retrofit
    implementation libs.converter.gson

    //implementation libs.smarttable
    implementation libs.androidx.multidex
    implementation libs.androidx.recyclerview.v110
    implementation libs.glide
    implementation libs.circleimageview
    //第三方库图片选择器
    // PictureSelector basic (Necessary)
    implementation libs.pictureselector
    // image compress library (Not necessary)
    implementation libs.compress
    // uCrop library (Not necessary)
    implementation libs.ucrop
    // simple camerax library (Not necessary)
    implementation libs.camerax
    implementation libs.azhon.appupdate
    implementation libs.crashreport
    //implementation libs.xui
    //mqtt
    implementation libs.org.eclipse.paho.client.mqttv3
    implementation libs.org.eclipse.paho.android.service
    implementation libs.bcpkix.jdk15on
    implementation libs.commons.codec
    //二维码扫描
    implementation libs.barcode.scanning

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