apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'

android {

    // For java 8 lambdas
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    defaultConfig {
        applicationId "com.airbnb.android.epoxysample"
        minSdkVersion 16
        compileSdk rootProject.COMPILE_SDK_VERSION
        targetSdkVersion rootProject.TARGET_SDK_VERSION
        vectorDrawables.useSupportLibrary = true
        versionCode 1
        versionName "1.0"
    }

    dataBinding {
        enabled = true
    }
}

kapt {
    correctErrorTypes = true
}

project.android.buildTypes.all { buildType ->
    buildType.javaCompileOptions.annotationProcessorOptions.arguments =
            [
                    validateEpoxyModelUsage     : String.valueOf(buildType.name == 'debug'),
                    requireHashCodeInEpoxyModels: "true",
                    requireAbstractEpoxyModels  : "true",
                    implicitlyAddAutoModels     : "true",
                    logEpoxyTimings     : "false",
                    enableParallelEpoxyProcessing     : "false",
            ]
}

dependencies {
    implementation project(':epoxy-databinding')
    implementation project(':epoxy-adapter')
    implementation project(':epoxy-annotations')
    kapt project(':epoxy-processor')

    implementation rootProject.deps.paris
    kapt rootProject.deps.parisProcessor

    implementation rootProject.deps.androidCardView
    implementation rootProject.deps.androidRecyclerView
    implementation rootProject.deps.androidAppcompat
    implementation rootProject.deps.versionedParcelable
    implementation rootProject.deps.lottie

    testImplementation rootProject.deps.junit
}
