apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
apply plugin: 'androidx.navigation.safeargs'

android {
    compileSdkVersion 28
    defaultConfig {
        applicationId "com.bitwindow.aacpaginginfinitescrollingwithnetworksample"
        minSdkVersion 16
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }

    buildTypes.each {
        // Register at TMDB website to get an API key
        // https://www.themoviedb.org/settings/api
        // You can add the key in your global ".gradle/gradle.properties" file ex:
        // TMDB_API_KEY="YOUR-API-KEY"
        // OR
        // you can use the key here as ex:
        // it.buildConfigField 'String', 'TMDB_API_KEY', "\"YOUR-API-KEY\""
        it.buildConfigField 'String', 'TMDB_API_KEY', TMDB_API_KEY
    }

    configurations.all {
        // To resolve the conflict for picasso 2.71828
        // dependency on com.android.support:exifinterface:27.1.0
        resolutionStrategy.force 'com.android.support:exifinterface:28.0.0'
    }
}

androidExtensions {
    //For LayoutContainer in MovieListViewHolder to provide
    // Android Extensions-style view access
    experimental = true
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])

    implementation"org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
    implementation 'com.android.support:appcompat-v7:28.0.0'
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'

    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'

    // ViewModel and LiveData
    implementation "android.arch.lifecycle:extensions:1.1.1"

    // Room dependencies
    implementation "android.arch.persistence.room:runtime:1.1.1"
    annotationProcessor "android.arch.persistence.room:compiler:1.1.1"
    kapt "android.arch.persistence.room:compiler:1.1.1"

    implementation 'com.android.support:recyclerview-v7:28.0.0'

    implementation "android.arch.paging:runtime:1.0.1"

    implementation("com.squareup.retrofit2:retrofit:2.4.0")
    implementation "com.squareup.retrofit2:converter-gson:2.4.0"

    implementation "com.jakewharton.timber:timber:4.7.1"
    implementation 'com.squareup.picasso:picasso:2.71828'
    debugImplementation 'com.amitshekhar.android:debug-db:1.0.4'

    implementation 'android.arch.navigation:navigation-fragment:1.0.0-alpha07'

    kapt 'com.google.dagger:dagger-compiler:2.17'
    implementation 'com.google.dagger:dagger:2.17'

}
