plugins {
    id("com.android.library")
    id("org.jetbrains.kotlin.android")
    id("com.google.devtools.ksp")
}

android {
    namespace = "com.isidroid.test_utils"
    compileSdk = BuildVersions.COMPILE_SDK

    defaultConfig {
        minSdk = BuildVersions.MIN_SDK

        testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
        consumerProguardFiles("consumer-rules.pro")
    }

    buildTypes {
        release {
            isMinifyEnabled = false
            proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
        }
    }
    compileOptions {
        sourceCompatibility = JavaVersion.VERSION_17
        targetCompatibility = JavaVersion.VERSION_17
    }
    kotlinOptions {
        jvmTarget = "17"
    }
}

dependencies {
    api("androidx.core:core-ktx:${GoogleVersions.coreKtx}")
    api("androidx.appcompat:appcompat:${GoogleVersions.appCompat}")


    api("com.squareup.okio:okio:${NetworkVersions.okio}")
    api("com.squareup.retrofit2:retrofit:${NetworkVersions.retrofit}")
    api("com.squareup.okhttp3:okhttp:${NetworkVersions.okhttp}")
    api("com.squareup.retrofit2:converter-gson:${NetworkVersions.retrofit}")
    api("com.squareup.okhttp3:logging-interceptor:${NetworkVersions.okhttp}")

    api("junit:junit:${TestVersions.junit}")
    api("androidx.test.ext:junit:${TestVersions.junitExt}")
    api("androidx.test.espresso:espresso-core:${TestVersions.espressoCore}")

    api("com.squareup.okhttp3:mockwebserver:${TestVersions.mockWebServer}")
    api("org.mockito:mockito-core:${TestVersions.mockitoCore}")
    api("org.mockito.kotlin:mockito-kotlin:${TestVersions.mockitoKotlin}")
    api("org.robolectric:robolectric:${TestVersions.robolectric}")
}