apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
apply plugin: 'io.objectbox'

android {
    flavorDimensions "default"
    compileSdkVersion 28
    defaultConfig {
        applicationId "com.freeportmetrics.kotlin_internal_project"
        minSdkVersion 23
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
    productFlavors {
        dev {
            buildConfigField "String", "SPACEX_API_URL", "\"https://api.spacexdata.com/v3/\""
        }
    }
}

ext {
    coroutinesVersion = '1.0.1'
    ktxVersion = '1.0.1'
    appCompatVersion = '1.0.2'
    recyclerViewVersion = '1.0.0'
    lifecycleExtensionsVersion = '2.0.0'

    retrofitVersion = '2.5.0'
    retrofitCoroutinesAdapterVersion = '0.9.2'
    timberVersion = '4.7.1'
    koinVersion = '2.0.0-rc-2'
    glideVersion = '4.9.0'

    testJunitVersion = '4.12'
    testRunnerVersion = '1.1.1'
    testEspressoVersion = '3.1.1'
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlinVersion"
    implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutinesVersion"
    implementation "androidx.core:core-ktx:$ktxVersion"
    implementation "androidx.appcompat:appcompat:$appCompatVersion"
    implementation "androidx.recyclerview:recyclerview:$recyclerViewVersion"
    implementation "androidx.lifecycle:lifecycle-extensions:$lifecycleExtensionsVersion"

    implementation "com.squareup.retrofit2:retrofit:$retrofitVersion"
    implementation "com.squareup.retrofit2:converter-gson:$retrofitVersion"
    implementation "com.jakewharton.retrofit:retrofit2-kotlin-coroutines-adapter:$retrofitCoroutinesAdapterVersion"
    implementation "com.jakewharton.timber:timber:$timberVersion"
    implementation "org.koin:koin-android:$koinVersion"
    implementation "org.koin:koin-androidx-viewmodel:$koinVersion"
    implementation "io.objectbox:objectbox-kotlin:$objectboxVersion"
    implementation "com.github.bumptech.glide:glide:$glideVersion"
    kapt "com.github.bumptech.glide:compiler:$glideVersion"

    testImplementation "junit:junit:$testJunitVersion"
    androidTestImplementation "androidx.test:runner:$testRunnerVersion"
    androidTestImplementation "androidx.test.espresso:espresso-core:$testEspressoVersion"
}
