plugins {
    id("com.google.devtools.ksp") version "2.1.21-2.0.1"
}
apply plugin: 'com.android.application'

apply plugin: 'kotlin-android'

apply plugin: 'kotlin-parcelize'

android {
    namespace "com.arif.kotlincoroutinesplusflow"
    compileSdkVersion 35
    buildToolsVersion "34.0.0"
    defaultConfig {
        applicationId "com.arif.kotlincoroutinesplusflow"
        minSdkVersion 21
        targetSdkVersion 35
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
        javaCompileOptions {
            annotationProcessorOptions {
                arguments = [
                        "room.schemaLocation"  : "$projectDir/schemas".toString(),
                        "room.incremental"     : "true",
                        "room.expandProjection": "true"]
            }
        }

    }
    buildTypes {
        release {
            shrinkResources true
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    buildFeatures {
        buildConfig = true
    }
}

tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
    kotlinOptions {
        jvmTarget = "1.8"
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation "org.jetbrains.kotlin:kotlin-stdlib:2.1.21"
    implementation 'androidx.appcompat:appcompat:1.7.1'
    implementation 'androidx.constraintlayout:constraintlayout:2.2.1'
    implementation 'androidx.recyclerview:recyclerview:1.4.0'
    implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.9.1"
    implementation "androidx.lifecycle:lifecycle-runtime-ktx:2.9.1"
    implementation "androidx.lifecycle:lifecycle-livedata-ktx:2.9.1"
    implementation "androidx.navigation:navigation-fragment-ktx:2.9.0"
    implementation "androidx.navigation:navigation-ui-ktx:2.9.0"
    implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.10.2"
    implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.10.2"
    implementation "com.squareup.retrofit2:retrofit:3.0.0"
    implementation("com.squareup.okhttp3:logging-interceptor:4.12.0")
    implementation "com.squareup.retrofit2:converter-moshi:3.0.0"
    implementation("com.squareup.moshi:moshi-kotlin:1.15.2")
    ksp("com.squareup.moshi:moshi-kotlin-codegen:1.15.2")
    implementation("io.coil-kt.coil3:coil:3.2.0")
    implementation("io.coil-kt.coil3:coil-network-okhttp:3.2.0")
    implementation "com.google.dagger:dagger:2.56.2"
    ksp "com.google.dagger:dagger-compiler:2.56.2"
    testImplementation 'junit:junit:4.13.2'
    androidTestImplementation 'androidx.test:core-ktx:1.6.1'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1'
    implementation "androidx.room:room-runtime:2.7.1"
    ksp "androidx.room:room-compiler:2.7.1"
    implementation "androidx.room:room-ktx:2.7.1"
    implementation "com.google.android.material:material:1.12.0"
    implementation "androidx.fragment:fragment-ktx:1.8.8"
    implementation 'com.jakewharton.timber:timber:5.0.1'
}
