import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

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

tasks.withType(KotlinCompile).all {
    kotlinOptions {
        freeCompilerArgs += [
                '-opt-in=kotlin.RequiresOptIn',
                '-opt-in=com.airbnb.mvrx.InternalMavericksApi',
        ]
    }
}

android {
    resourcePrefix "mvrx_"

    sourceSets {
        test.res.srcDirs += 'src/test/res'
    }

    testOptions {
        unitTests {
            includeAndroidResources = true
            all {
                jacoco {
                    includeNoLocationClasses = true
                    jacoco.excludes = ['jdk.internal.*']
                }
            }
        }
    }
    namespace 'com.airbnb.mvrx.navigation'
}

dependencies {
    api project(":mvrx")
    implementation libs.lifecycleCommon

    api libs.navigationUiKtx
    api libs.navigationFragmentKtx

    testImplementation project(":mvrx-testing")
    testImplementation libs.junit
    testImplementation libs.mockito
    testImplementation libs.roboeletric
    testImplementation libs.fragmentKtx
    testImplementation libs.fragmentTesting
}
