apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'

android {
    compileSdkVersion 29
    buildToolsVersion "29.0.3"

    defaultConfig {
        applicationId "com.fuban.user"
        minSdkVersion 21
        targetSdkVersion 29
        versionCode 5
        versionName "3.0.2"
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }

    //签名
    signingConfigs {
        release {
                storeFile file("fuban_user.jks")
                storePassword "sinata"
                keyAlias "fuban_user"
                keyPassword "sinata"
        }
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
            signingConfig signingConfigs.release
            ndk {
                abiFilters "armeabi-v7a","arm64-v8a" // 保留这种架构的CPU
            }
            applicationVariants.all { variant ->
                // 更新至Android Studio 3.3 gradle 4.10.1
                variant.outputs.all {
                    outputFileName = "fuban_user-${defaultConfig.versionName}-${new Date().format("yyyy-MM-dd" , TimeZone.getTimeZone("GMT+08")) }.apk"
                }
            }
        }

        debug {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            signingConfig signingConfigs.release
            ndk {
                abiFilters "armeabi-v7a" // 保留这种架构的CPU
            }
        }
    }

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    //netty 必须屏蔽这几个文件
    packagingOptions {
        exclude 'META-INF/NOTICE' // will not include NOTICE file
        exclude 'META-INF/LICENSE' // will not include LICENSE file
        //netty files
        exclude 'META-INF/INDEX.LIST' // will not include this file
        exclude 'META-INF/io.netty.versions.properties' // will not include this file
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
    api "androidx.appcompat:appcompat:$support_version"
    implementation 'androidx.core:core-ktx:1.3.0'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test.ext:junit:1.1.1'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
    implementation project(path: ':xldutils-kotlin')
    implementation project(path: ':amaplib')
    implementation 'com.google.android.material:material:1.3.0-alpha01'
    implementation project(path: ':rxnetty')
    implementation project(path: ':umeng_sdk')
    implementation 'com.youth.banner:banner:2.0.11'
    implementation 'com.github.promeg:tinypinyin:2.0.3'
    implementation 'top.zibin:Luban:1.1.8'
    implementation 'com.aliyun.dpa:oss-android-sdk:2.9.13'
//    implementation 'com.huaweicloud:esdk-obs-android:3.21.12'

    implementation "com.daimajia.swipelayout:library:1.2.0@aar"
    implementation 'cn.bingoogolapple:bga-qrcode-zxing:1.3.7'//二维码
    implementation 'com.haibin:calendarview:3.6.9'//日历
    implementation project(path: ':download')
}
