import com.android.build.gradle.internal.tasks.factory.dependsOn

plugins {
    id("com.android.library")
    kotlin("android")
    kotlin("kapt")
    id("kotlin-parcelize")
}

setupCore()

android {
    defaultConfig {
        consumerProguardFiles("proguard-rules.pro")


        kapt.arguments {
            arg("room.incremental", true)
            arg("room.schemaLocation", "$projectDir/schemas")
        }
    }
}


dependencies {
    val coroutinesVersion = "1.5.0"
    val roomVersion = "2.3.0"
    val workVersion = "2.5.0"

    api(project(":plugin"))
    api("androidx.core:core-ktx:1.6.0")
    // https://android-developers.googleblog.com/2019/07/android-q-beta-5-update.html
    api("androidx.drawerlayout:drawerlayout:1.1.1")
    api("androidx.fragment:fragment-ktx:1.3.5")
    api("com.google.android.material:material:1.4.0")
    implementation("com.squareup.okhttp3:okhttp:4.9.0")
    api("androidx.lifecycle:lifecycle-common-java8:$lifecycleVersion")
    api("androidx.lifecycle:lifecycle-livedata-core-ktx:$lifecycleVersion")
    api("androidx.preference:preference:1.1.1")
    api("androidx.room:room-runtime:$roomVersion")
    api("androidx.work:work-multiprocess:$workVersion")
    api("androidx.work:work-runtime-ktx:$workVersion")
    api("com.google.android.gms:play-services-oss-licenses:17.0.0")
    api("com.google.code.gson:gson:2.8.7")
    api("com.jakewharton.timber:timber:4.7.1")
    api("dnsjava:dnsjava:3.4.0")
    api("org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutinesVersion")
    api("org.jetbrains.kotlinx:kotlinx-coroutines-play-services:$coroutinesVersion")
    implementation("com.tencent:mmkv:1.2.10")
    kapt("androidx.room:room-compiler:$roomVersion")
    androidTestImplementation("androidx.room:room-testing:$roomVersion")
    androidTestImplementation("androidx.test.ext:junit-ktx:1.1.3")
}
