plugins {
    id 'com.android.application'
}

android {
    namespace 'com.example.demo'
    compileSdk = 36

    defaultConfig {
        //需要优化一下摄像头焦距和 按比例显示...
        versionCode 20251011
        versionName "20251011"

        applicationId "com.ai.face.verifyPub"
        minSdk 21
        targetSdk 36    //target SDK 还是28 的请参考question.md 文档说明
        
        ndk {
//            abiFilters 'arm64-v8a' //暂时只配置64位CPU，32位需要的自行配置
            abiFilters 'armeabi-v7a', 'arm64-v8a' //根据CPU架构选择对应ABI
        }
    }

    signingConfigs {
        release {
            storeFile file("FaceAIPublic")
            storePassword "FaceAIPublic"
            keyAlias "FaceAIPublic"
            keyPassword "FaceAIPublic"
        }
    }

    buildTypes {
        debug {
            minifyEnabled true
            shrinkResources true
            debuggable true
            signingConfig signingConfigs.release
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }

        release {
            minifyEnabled true
            shrinkResources true
            debuggable true
            signingConfig signingConfigs.release
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }

    }

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_17
        targetCompatibility JavaVersion.VERSION_17
    }

    //将工程so库进行压缩
    packaging {
        jniLibs {
            useLegacyPackaging true
        }
    }

}

//CameraX，适配Android16 KB Page请强制升级到1.4.2 以上版本
def camera_version = "1.4.2"
configurations.configureEach {
    resolutionStrategy {
        force "androidx.camera:camera-core:$camera_version",
                "androidx.camera:camera-camera2:$camera_version",
                "androidx.camera:camera-lifecycle:$camera_version",
                "androidx.camera:camera-view:$camera_version"
    }
}


dependencies {
    //在你的项目主工程依赖faceAILib，熟悉了SDK 接入源码后再根据你的业务修改实现
    implementation project(':faceAILib')

    implementation 'androidx.appcompat:appcompat:1.6.0'
    implementation 'androidx.constraintlayout:constraintlayout:2.1.4'

}
