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

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

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

android {
    resourcePrefix 'mvrx_'

    defaultConfig {
        consumerProguardFiles 'proguard-rules.pro'
    }

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

dependencies {
    api project(':mvrx')
    implementation libs.kotlinReflect
    implementation libs.appcompat

    testImplementation project(':mvrx-testing')
    testImplementation libs.mockito
    testImplementation libs.junit
    testImplementation libs.roboeletric
    testImplementation libs.kotlinCoroutinesTest

    // Including autovalue just for the AutoValue type printer test
    testImplementation libs.autoValue
    kaptTest libs.autoValue
}

