apply plugin: 'com.android.application'

android {
    compileSdkVersion 30
    buildToolsVersion "30.0.2"

    defaultConfig {
        applicationId "com.zukron.newsapp"
        minSdkVersion 21
        targetSdkVersion 30
        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_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
}

dependencies {
    implementation fileTree(dir: "libs", include: ["*.jar"])
    implementation 'androidx.appcompat:appcompat:1.2.0'
    implementation 'androidx.constraintlayout:constraintlayout:2.0.1'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test.ext:junit:1.1.2'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'

    // material design
    implementation "com.google.android.material:material:1.2.1"

    // Glide
    def glide_version = "4.11.0"
    implementation "com.github.bumptech.glide:glide:$glide_version"
    annotationProcessor "com.github.bumptech.glide:compiler:$glide_version"

    // Paging
    def paging_version = "2.1.2"
    implementation "androidx.paging:paging-runtime:$paging_version"

    // Lifecycle and view model
    def lifecycle_version = "2.2.0"
    implementation "androidx.lifecycle:lifecycle-extensions:$lifecycle_version"

    // Retrofit2
    def retrofit2_version = "2.9.0"
    implementation "com.squareup.retrofit2:converter-gson:$retrofit2_version"
    implementation "com.squareup.retrofit2:retrofit:$retrofit2_version"
    implementation "com.squareup.retrofit2:adapter-rxjava3:$retrofit2_version"

    // RX java
    def rx_java_version = "3.0.6"
    implementation "io.reactivex.rxjava3:rxjava:$rx_java_version"

    // Rx android
    def rx_android_version = "3.0.0"
    implementation "io.reactivex.rxjava3:rxandroid:$rx_android_version"

    // three tan abp
    def three_tan_abp_version = "1.2.4"
    implementation "com.jakewharton.threetenabp:threetenabp:$three_tan_abp_version"
}