apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'

def YOUTUBE_APIKEY = '"' + SIMPLEMVP_YOUTUBE_API_KEY + '"' ?: '"Error"'
def APOD_APIKEY = '"' + SIMPLEMVP_NASA_API_KEY + '"' ?: '"Error"'
def STRING = 'String'

android {
    compileSdkVersion 28

    defaultConfig {
        applicationId "com.gaston.macbook.kotlinsimplemvp"
        minSdkVersion 19
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"

        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

        each {
            type ->
                type.buildConfigField STRING, 'APODApiKey', APOD_APIKEY
                type.buildConfigField STRING, 'YoutubeApiKey', YOUTUBE_APIKEY
        }

    }



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

}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
    implementation 'com.android.support:appcompat-v7:28.0.0'
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    implementation 'androidx.appcompat:appcompat:1.0.0-beta01'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.2'
    implementation "com.github.bumptech.glide:glide:$rootProject.ext.glide"
    implementation "com.squareup.retrofit2:retrofit:$rootProject.ext.retrofit"
    implementation "com.squareup.retrofit2:converter-gson:$rootProject.ext.retrofit"
    implementation "com.github.chrisbanes:PhotoView:$rootProject.ext.photoview"

    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
    implementation files('libs/YouTubeAndroidPlayerApi.jar')

}
