plugins {
    id 'com.android.application'
}
apply plugin: 'kotlin-android'

android {
    compileSdkVersion 31

    defaultConfig {
        applicationId "com.fingerprintjs.android.aev.demo"
        minSdk 21
        targetSdk 31
        versionCode Integer.parseInt(project.VERSION_CODE)
        versionName project.VERSION_NAME

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }


    signingConfigs {
        release {
            storeFile file("release.jks")
            storePassword System.getenv('KEYSTORE_PASSWORD')
            keyAlias System.getenv('RELEASE_SIGN_KEY_ALIAS')
            keyPassword System.getenv('RELEASE_SIGN_KEY_PASSWORD')
        }
    }

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

    applicationVariants.all { variant ->
        variant.outputs.all {
            outputFileName = "AEV-Demo-${variant.versionName}-${variant.name}.apk"
        }
    }
}

dependencies {
    implementation project(':aev')
    implementation 'androidx.appcompat:appcompat:1.3.1'
    implementation 'com.google.android.material:material:1.4.0'
    implementation "com.github.fingerprintjs:fingerprint-android:2.0.0"
    implementation "com.fingerprint.android:pro:2.2.1"
    implementation 'androidx.preference:preference-ktx:1.1.1'
    implementation 'androidx.security:security-crypto-ktx:1.1.0-alpha03'
    implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
    implementation "androidx.core:core-ktx:1.7.0"
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}