plugins {
    id 'com.android.application'
}

android {
    signingConfigs {
        digiview {
                try{
                    storeFile file(digiviewStoreFile)
                    storePassword digiviewStorePassword
                    keyPassword digiviewKeyPassword
                    keyAlias digiviewKeyAlias
                }
                catch (ex) {
                        println("You should define mStoreFile, mStorePassword, mKeyPassword and mKeyAlias in ~/.gradle/gradle.properties.")
                }
        }
    }

    compileSdkVersion 30
    buildToolsVersion "30.0.3"

    defaultConfig {
        applicationId "com.fpvout.digiview"
        minSdkVersion 21
        targetSdkVersion 30
        versionCode 3
        versionName '1.0.0'
        resConfigs "en", "de", "fr", "es", "zh", "pt"
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }

    buildTypes {
        debug {
            applicationIdSuffix '.debug'
            versionNameSuffix '-debug'
            signingConfig debug.signingConfig
            debuggable true
        }
        alpha {
            //applicationIdSuffix '.alpha'
            versionNameSuffix '-alpha'
            signingConfig signingConfigs.digiview
        }
        beta {
            //applicationIdSuffix '.beta'
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
            versionNameSuffix '-beta'
            signingConfig signingConfigs.digiview
        }
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
            signingConfig signingConfigs.digiview
        }

    }

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
}

dependencies {

    implementation 'androidx.appcompat:appcompat:1.2.0'
    implementation 'com.google.android.material:material:1.3.0'
    implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
    implementation 'com.google.android.exoplayer:exoplayer:2.13.3'
    implementation 'io.sentry:sentry-android:4.3.0'
    implementation 'androidx.preference:preference:1.1.1'

    testImplementation 'junit:junit:4.+'
    androidTestImplementation 'androidx.test.ext:junit:1.1.2'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
}