plugins {
    id 'com.android.application'
}

android {
    compileSdk 31

    defaultConfig {
        applicationId "com.baoshi.swms"
        minSdk 28
        targetSdk 31
        versionCode 1
        versionName "1.0.4"

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }

    buildTypes {
        release {
            //是否开启zip优化
            zipAlignEnabled true
            //是否开启混淆
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard.cfg'

            android.applicationVariants.all { variant ->
                variant.outputs.all {
                    outputFileName = "SWMS.apk"
                }
            }
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    buildFeatures {
        viewBinding true
    }
}

dependencies {

    implementation 'androidx.appcompat:appcompat:1.2.0'
    implementation 'com.google.android.material:material:1.3.0'
    testImplementation 'junit:junit:4.+'
    androidTestImplementation 'androidx.test.ext:junit:1.1.2'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'

    annotationProcessor 'com.jakewharton:butterknife-compiler:10.2.0'

    implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
    implementation 'androidx.navigation:navigation-fragment:2.3.5'
    implementation 'androidx.navigation:navigation-ui:2.3.5'

    implementation 'com.google.code.gson:gson:2.8.6'  //JSON解析
    implementation 'com.contrarywind:Android-PickerView:4.1.9' //picker视图
    implementation 'com.jakewharton:butterknife:10.2.0' //view注入
    implementation 'com.google.zxing:core:3.3.0' //二维码
    implementation 'com.squareup.okhttp3:okhttp:4.9.1' //http请求
    implementation "io.reactivex.rxjava2:rxjava:2.2.0" //订阅发布
    implementation "io.reactivex.rxjava2:rxandroid:2.1.0"
    implementation 'com.squareup.retrofit2:retrofit:2.6.2'//对ok3的封装
    implementation 'com.squareup.retrofit2:adapter-rxjava2:2.6.2'//适配器
    implementation 'com.squareup.retrofit2:converter-gson:2.6.2'//转换器
    implementation 'com.teprinciple:updateapputils:2.3.0'//自动更新

    def dialogx_version = "0.0.43.beta13"
    implementation "com.github.kongzue.DialogX:DialogX:${dialogx_version}"//消息框组件
    implementation 'com.github.kongzue.DialogXSample:DatePicker:0.0.1.alpha4'//日期选择框扩展包依赖上述
    implementation "com.github.kongzue.DialogX:DialogXMIUIStyle:${dialogx_version}"//主题
}