apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'

android {
    compileSdkVersion rootProject.ext.android["compileSdkVersion"]
    defaultConfig {
        minSdkVersion rootProject.ext.android["minSdkVersion"]
        targetSdkVersion rootProject.ext.android["targetSdkVersion"]
        versionCode rootProject.ext.android["versionCode"]
        versionName rootProject.ext.android["versionName"]
        multiDexEnabled true
    }

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    dexOptions {
        incremental true
    }

    viewBinding{
        enabled = true
    }

    sourceSets {
        main {
            jniLibs.srcDirs = ['libs']
        }
    }

//    signingConfigs {
//        release {
//            storeFile file("../keystore/jetour.keystore")
//            storePassword "makecherygreat"
//            keyAlias "chery"
//            keyPassword "chery+1s"
//        }
//    }

    buildTypes {
        debug {
            ndk {
                abiFilters "armeabi-v7a", "x86"
            }
//            shrinkResources false
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
//            signingConfig signingConfigs.release
        }
        release {
            ndk {
                abiFilters "armeabi-v7a", "arm64-v8a"
            }
//            shrinkResources true
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
//            signingConfig signingConfigs.release
        }
    }

    lintOptions {
        checkReleaseBuilds false
        abortOnError false
    }

    ndkVersion '25.1.8937393'

}


dependencies {
    // 系统库，libs
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation 'com.github.18Gray:CommonUtils:v0.8'
    implementation 'androidx.multidex:multidex:2.0.1'

    // kotlin扩展
    implementation rootProject.ext.dependencies["kotlin-stdlib-jdk8"]
    implementation rootProject.ext.dependencies["activity-ktx"]
    implementation rootProject.ext.dependencies["lifecycle-viewmodel-ktx"]
    implementation rootProject.ext.dependencies["lifecycle-livedata-ktx"]
    implementation rootProject.ext.dependencies["lifecycle-runtime-ktx"]
    implementation rootProject.ext.dependencies["navigation-fragment-ktx"]
    implementation rootProject.ext.dependencies["navigation-ui-ktx"]
    implementation rootProject.ext.dependencies["kotlinx-coroutines-core"]
    implementation rootProject.ext.dependencies["kotlinx-coroutines-android"]

    //基础库
    implementation rootProject.ext.dependencies["appcompat"]
    implementation rootProject.ext.dependencies["material"]
    implementation rootProject.ext.dependencies["coordinatorlayout"]
    implementation rootProject.ext.dependencies["drawerlayout"]
    implementation rootProject.ext.dependencies["swiperefreshlayout"]
    implementation rootProject.ext.dependencies["recyclerview"]

}