plugins {
    id 'com.android.application'
    id 'org.jetbrains.kotlin.android'
    id 'kotlin-android'
    id 'kotlin-kapt'
    id 'com.google.gms.google-services'
}

android {

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    compileSdkVersion rootProject.ext.compileSdkVersion

    defaultConfig {
        applicationId "co.centroida.notifications"
        minSdkVersion rootProject.ext.minSdkVersion
        targetSdkVersion rootProject.ext.targetSdkVersion
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        debug {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
        release {
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }

    kotlinOptions {
        jvmTarget = JavaVersion.VERSION_1_8.toString()
    }

    lintOptions {
        disable "ResourceType"
    }
}

dependencies {
    // Androidx
    implementation "androidx.core:core-ktx:$rootProject.ext.androidx"
    implementation "androidx.appcompat:appcompat:$rootProject.ext.appcompat"
    implementation "androidx.constraintlayout:constraintlayout:$rootProject.ext.constraintLayout"
    implementation "com.google.android.material:material:$rootProject.ext.material"

    // Testing
    testImplementation "junit:junit:$rootProject.ext.junit"
    androidTestImplementation "androidx.test.ext:junit:$rootProject.ext.test_junit"
    androidTestImplementation "androidx.test.espresso:espresso-core:$rootProject.ext.espresso"

    // Firebase
    implementation platform("com.google.firebase:firebase-bom:$rootProject.ext.firebase")
    implementation "com.google.firebase:firebase-messaging-ktx"
    implementation "com.google.firebase:firebase-analytics-ktx"

    // Glide
    implementation "com.github.bumptech.glide:glide:$rootProject.ext.glide"
    kapt "com.github.bumptech.glide:compiler:$rootProject.ext.glide"

    // LeakCanary
    debugImplementation "com.squareup.leakcanary:leakcanary-android:$rootProject.ext.leakCanary"
}