apply plugin: 'com.android.application'

apply plugin: 'kotlin-android'

apply plugin: 'kotlin-kapt'

apply plugin: 'kotlin-android-extensions'

apply plugin: 'kotlin-platform-android'

//ButterKnife
apply plugin: 'com.jakewharton.butterknife'

apply from: 'configuration.gradle'

android {
    compileSdkVersion 29
    buildToolsVersion '29.0.2'
    defaultConfig {
        applicationId 'com.eltaher.task'
        minSdkVersion 16
        targetSdkVersion 29
        versionCode project.versionCode
        versionName project.versionName
        multiDexEnabled true
    }
    buildTypes {
        debug {
            debuggable true
        }
        release {
            debuggable false
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }

    compileOptions {
        targetCompatibility JavaVersion.VERSION_1_8
        sourceCompatibility JavaVersion.VERSION_1_8
    }
    productFlavors {
    }
    defaultConfig {
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }
    kotlinOptions {
        jvmTarget = JavaVersion.VERSION_1_8
    }
    packagingOptions {
        pickFirst 'META-INF/kotlinx-io.kotlin_module'
        pickFirst 'META-INF/atomicfu.kotlin_module'
        pickFirst 'META-INF/kotlinx-coroutines-core.kotlin_module'
        pickFirst 'META-INF/kotlinx-coroutines-io.kotlin_module'
    }

}
repositories {
    repositories {
        mavenCentral()
    }
}
configurations.all {
    resolutionStrategy {
        force "com.android.support:support-annotations:28.0.0"
        exclude module: "support-v13"
    }
}
dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')

    //kotlin
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
    implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"

    /**-------------------testing libs------------------------------------------**/

    //UI Testing , AndroidJUnitRunner and JUnit Rules &Espresso dependencies

    //junit 5
    testImplementation 'org.junit.jupiter:junit-jupiter-engine:5.5.2'
    testImplementation 'org.junit.jupiter:junit-jupiter-api:5.5.2'
    testImplementation 'org.junit.platform:junit-platform-runner:1.5.2'

    //noinspection GradleCompatible
    implementation 'androidx.test:rules:1.2.0'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
    androidTestImplementation 'androidx.test.espresso:espresso-contrib:3.2.0'
    androidTestImplementation 'androidx.test.espresso:espresso-intents:3.2.0'
    androidTestImplementation 'androidx.test.espresso:espresso-accessibility:3.2.0'
    androidTestImplementation 'androidx.test.espresso:espresso-web:3.2.0'
    androidTestImplementation 'androidx.test.espresso.idling:idling-concurrent:3.2.0'
    androidTestImplementation 'androidx.test.espresso:espresso-idling-resource:3.2.0'
    implementation 'androidx.test.espresso:espresso-core:3.2.0'
    implementation 'androidx.test.espresso:espresso-contrib:3.2.0'
    implementation 'androidx.test.espresso:espresso-intents:3.2.0'
    implementation 'androidx.test.espresso:espresso-accessibility:3.2.0'
    implementation 'androidx.test.espresso:espresso-web:3.2.0'
    implementation 'androidx.test.espresso.idling:idling-concurrent:3.2.0'
    implementation 'androidx.test.espresso:espresso-idling-resource:3.2.0'

    /**-------------------------------------------------------------**/

    //android support & recyclerview
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    implementation 'androidx.recyclerview:recyclerview:1.0.0'
    implementation 'androidx.appcompat:appcompat:1.1.0'
    implementation 'com.google.android.material:material:1.2.0-alpha01'

    //Dagger
    implementation 'com.google.dagger:dagger:2.25.2'
    kapt 'com.google.dagger:dagger-compiler:2.25.2'

    //butterknife
    implementation 'com.jakewharton:butterknife:10.2.0'
    kapt 'com.jakewharton:butterknife-compiler:10.2.0'

    //Logging
    implementation 'com.squareup.okhttp3:logging-interceptor:4.2.2'

    // retrofit
    implementation 'com.squareup.retrofit2:retrofit:2.6.2'
    implementation 'com.squareup.retrofit2:converter-gson:2.6.2'
    implementation 'com.squareup.okhttp3:okhttp:4.2.2'

    //picasso
    implementation 'com.squareup.picasso:picasso:2.71828'

    //MultiDex
    implementation 'androidx.multidex:multidex:2.0.1'

    //ANKO
    implementation "org.jetbrains.anko:anko-commons:$anko_version"
    implementation "org.jetbrains.anko:anko-design:$anko_version"
    androidExtensions {
        experimental = true
    }
    //Mockk
    implementation 'io.mockk:mockk:1.9.3'
    //coroutines
    implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.2'
    implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.2'
    implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core-common:1.3.2'
}