// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    ext.kotlin_version = '1.4.30'
    repositories {
        google()
        jcenter()

    }
    dependencies {
        classpath 'com.android.tools.build:gradle:4.1.2'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        google()
        jcenter()
    }

    ext {

        androidLibs = [
                appcompat           : 'androidx.appcompat:appcompat:1.2.0',
                recyclerview        : 'androidx.recyclerview:recyclerview:1.1.0',
                constraintlayout    : 'androidx.constraintlayout:constraintlayout:2.0.4',
                androidxCore        : 'androidx.core:core-ktx:1.3.2',
                lifecycleViewModel  : 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.0',
                playServicesLocation: 'com.google.android.gms:play-services-location:17.1.0',
                material            : 'com.google.android.material:material:1.3.0',
                roomRuntime         : 'androidx.room:room-runtime:2.2.6',
                glide               : 'com.github.bumptech.glide:glide:4.12.0',
                dexter              : 'com.karumi:dexter:6.2.2'
        ]

        androidKaptLibs = [
                roomCompiler : 'androidx.room:room-compiler:2.2.6',
                glideCompiler: 'com.github.bumptech.glide:compiler:4.12.0'
        ]

        kotlinLibs = [
                stdlib    : "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version",
                coroutines: 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.4.2'
        ]

        libs = [
                okhttpLoginInterceptor   : 'com.squareup.okhttp3:logging-interceptor:4.9.0',
                retrofit                 : 'com.squareup.retrofit2:retrofit:2.9.0',
                retrofitGsonConverter    : 'com.squareup.retrofit2:converter-gson:2.9.0',
                koin                     : "org.koin:koin-androidx-viewmodel:2.2.2"
        ]

        testLibs = [
                junit        : 'junit:junit:4.13.1',
                mockitoKotlin: "com.nhaarman.mockitokotlin2:mockito-kotlin:2.2.0",
                mockitoInline: "org.mockito:mockito-inline:2.28.2",
                koinTest     : 'org.koin:koin-test:2.2.0-rc-4',
                testShared   : project(':testShared')
        ]

        androidxTestLibs = [
                archCoreTesting: 'androidx.arch.core:core-testing:2.1.0'
        ]

        androidTestLibs = [
                testRunner   : 'androidx.test:runner:1.3.0',
                espresso     : 'androidx.test.espresso:espresso-contrib:3.3.0',
                rules        : 'androidx.test:rules:1.3.0',
                extJunit     : 'androidx.test.ext:junit-ktx:1.1.2',
                koinTest     : 'org.koin:koin-test:2.2.0-rc-4',
                mockWebServer: 'com.squareup.okhttp3:mockwebserver:4.9.0',
                okhttpIdling : 'com.jakewharton.espresso:okhttp3-idling-resource:1.0.0'
        ]
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}
