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

android {
    namespace 'com.fabernovel.test_firebase_test_lab'
    compileSdkVersion System.getenv("COMPILE_SDK_VERSION") as Integer
    buildToolsVersion System.getenv("BUILD_TOOLS_VERSION")

    adbOptions {
        installOptions "-g", "-r"
    }

    defaultConfig {
        applicationId "com.fabernovel.testapp"
        minSdkVersion System.getenv("MIN_SDK_VERSION") as Integer
        targetSdkVersion System.getenv("TARGET_SDK_VERSION") as Integer
        versionCode 1
        versionName "1.0"

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile("proguard-android-optimize.txt"),
                "proguard-rules.pro"
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_21
        targetCompatibility JavaVersion.VERSION_21
    }
    kotlinOptions {
        jvmTarget = "21"
    }
}

dependencies {

    implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
    implementation "androidx.core:core-ktx:1.2.0"
    implementation "androidx.appcompat:appcompat:1.1.0"
    implementation "com.google.android.material:material:1.1.0"
    implementation "androidx.constraintlayout:constraintlayout:1.1.3"
    def nav_version = "2.2.1"
    implementation "androidx.navigation:navigation-fragment:$nav_version"
    implementation "androidx.navigation:navigation-ui:$nav_version"
    implementation "androidx.lifecycle:lifecycle-livedata-ktx:2.2.0"
    implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.2.0"
    implementation "androidx.navigation:navigation-fragment-ktx:2.2.2"
    implementation "androidx.navigation:navigation-ui-ktx:2.2.2"
    def fragment_version = "1.2.4"
    implementation "androidx.fragment:fragment-ktx:$fragment_version"
    implementation "androidx.activity:activity-ktx:1.1.0"
    testImplementation "junit:junit:4.13"
    debugImplementation "androidx.fragment:fragment-testing:$fragment_version"
    androidTestImplementation "androidx.test.ext:junit:1.1.1"
    androidTestImplementation "androidx.test:core-ktx:1.2.0"
    androidTestImplementation "androidx.test.espresso:espresso-core:3.2.0"
    androidTestImplementation(group: 'androidx.test.espresso', name: 'espresso-contrib', version: '3.1.0-alpha3')
}
