plugins {
    id 'com.android.application'
    id 'kotlin-android'
}

android {
    namespace = "com.alimin.pic"
    compileSdkVersion Integer.parseInt(target_version)

    defaultConfig {
        applicationId "com.alimin.pic"
        minSdkVersion Integer.parseInt(min_version)
        targetSdkVersion Integer.parseInt(target_version)
        versionCode Integer.parseInt(version_code)
        versionName version_name

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
        flavorDimensions "version"
        ndk {
            stl "libstdc++"
            abiFilters "arm64-v8a"
//            abiFilters "armeabi-v7a", "arm64-v8a"
        }
    }

    if (rootProject.keyAlias != '' && rootProject.keyAlias != '' && rootProject.keyAlias != '') {
        signingConfigs {
            debug {
                storeFile file('../lmyooyo.jks')
                keyAlias rootProject.keyAlias
                keyPassword rootProject.keyPassword
                storePassword rootProject.storePassword
            }

            release {
                storeFile file('../lmyooyo.jks')
                keyAlias rootProject.keyAlias
                keyPassword rootProject.keyPassword
                storePassword rootProject.storePassword
            }
        }
    } else {
        signingConfigs {
            debug {
                storeFile file("../alimin_debug.jks")
                keyAlias "debug"
                keyPassword "123456"
                storePassword "123456"
            }

            release {
                storeFile file("../alimin_debug.jks")
                keyAlias "debug"
                keyPassword "123456"
                storePassword "123456"
            }
        }
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    kotlinOptions {
        jvmTarget = "1.8"
    }
    buildFeatures {
        compose = false
        viewBinding = true
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
    implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.1.1"
    implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.1.1"
    implementation "androidx.appcompat:appcompat:$androidx_version"
    implementation "androidx.core:core-ktx:$androidx_version"
    implementation "com.google.android.material:material:$material_version"
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
    implementation 'com.tencent.bugly:crashreport:4.0.4'
    implementation 'pub.devrel:easypermissions:3.0.0'
    implementation("com.microsoft.fluentui:FluentUIAndroid:0.2.1")
    implementation("com.microsoft.design:fluent-system-icons:1.1.164@aar")
    implementation project(path: ':fkandroid')
    implementation project(path: ':hwcommon')
    implementation project(path: ':hwmvp')
}