apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'com.vanniktech.maven.publish'
apply plugin: 'com.squareup.anvil'
apply plugin: 'kotlin-parcelize'

dependencies {
    implementation deps.androidx_fragment
    implementation deps.kotlinStdLib
    implementation deps.lifecycle_viewmodel
    implementation deps.javaxInject
    implementation deps.dagger2

    api project(":annotations")

    debugImplementation deps.appcompat

    testImplementation deps.kotlintestjunit
    testImplementation deps.truth
    testImplementation project(':testing')

    androidTestImplementation deps.androidx_test_runner
    androidTestImplementation deps.kotlintestjunit
    androidTestImplementation deps.androidx_test_core
    androidTestImplementation deps.androidx_test_rules
    androidTestImplementation deps.espresso_core
    androidTestImplementation deps.truth
}

tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
    sourceCompatibility = JavaVersion.VERSION_1_8
    targetCompatibility = JavaVersion.VERSION_1_8

    kotlinOptions {
        jvmTarget = '1.8'
        freeCompilerArgs += ["-Xopt-in=kotlin.RequiresOptIn", '-Xjvm-default=compatibility']
    }
}
android {
    packagingOptions {
        exclude 'META-INF/annotations.kotlin_module'
    }
}