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

android {
    namespace = "com.isidroid.job"
    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(project(":core:network"))
    api(project((":core:core")))
    api(project((":core:utils")))
    testApi(project((":core:test_utils")))

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

    api("com.google.dagger:hilt-android:${GoogleVersions.hilt}")
    api("androidx.work:work-runtime-ktx:${GoogleVersions.work}")
    api("androidx.hilt:hilt-work:${GoogleVersions.work_hilt}")
    api("androidx.room:room-runtime:${GoogleVersions.room}")

    ksp("androidx.hilt:hilt-compiler:${GoogleVersions.work_hilt}")
    ksp("com.google.dagger:hilt-compiler:${GoogleVersions.hilt}")
    ksp("androidx.room:room-compiler:${GoogleVersions.room}")

    // Firebase
    api("com.google.firebase:firebase-crashlytics-ktx")

    // tools
    api("com.jakewharton.timber:timber:${ToolsVersions.timber}")

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