plugins {
    id 'com.gladed.androidgitversion' version '0.4.4'
}

androidGitVersion {
    abis = ['armeabi':1, 'armeabi-v7a':2, 'arm64-v8a':3, 'mips':5, 'mips64':6, 'x86':8, 'x86_64':9 ]
    prefix ''
}

println 'Version Name: ' + androidGitVersion.name()
println 'Version Code: ' + androidGitVersion.code()

apply plugin: 'com.android.application'
android {
    compileSdkVersion = rootProject.ext.compileApi
    buildToolsVersion = rootProject.ext.toolsVersion

    defaultConfig {
        applicationId "com.freerdp.afreerdp"
        minSdkVersion rootProject.ext.minApi
        targetSdkVersion rootProject.ext.targetApi
        vectorDrawables.useSupportLibrary = true
        versionName = androidGitVersion.name()
        versionCode = androidGitVersion.code()
    }

    signingConfigs {
        release {
            storeFile file(RELEASE_STORE_FILE)
            storePassword RELEASE_STORE_PASSWORD
            keyAlias RELEASE_KEY_ALIAS
            keyPassword RELEASE_KEY_PASSWORD
            storeType "jks"
        }
    }

    buildTypes {
        release {
            minifyEnabled false
            signingConfig signingConfigs.release
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
        }
        debug {
            jniDebuggable true
            renderscriptDebuggable true
        }
    }
}

dependencies {
    implementation project(':freeRDPCore')
}
