plugins {
    id 'com.android.application'
    id 'kotlin-android'
    id 'kotlin-kapt'
}

android {
    def ext = rootProject.extensions.ext
    compileSdkVersion ext.android.compileSdk

    defaultConfig {
        minSdkVersion ext.android.minSdk
        targetSdkVersion ext.android.targetSdk
        versionCode ext.application.versionCode
        versionName ext.application.versionName
        applicationId ext.application.id
        testInstrumentationRunner ext.application.testInstrumentationRunner
        vectorDrawables.useSupportLibrary true
        multiDexEnabled true
    }

    aaptOptions {
        cruncherEnabled !ext.build.ciBuild
    }

    buildTypes {
        debug {
            testCoverageEnabled true
        }
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }

    dataBinding {
        enabled true
    }

    testOptions {
        unitTests {
            // By default, local unit tests throw an exception any time the code you are testing tries to access
            // Android platform APIs (unless you mock Android dependencies yourself or with a testing
            // framework like Mockito). However, you can enable the following property so that the test
            // returns either null or zero when accessing platform APIs, rather than throwing an exception.
            returnDefaultValues true
        }
        animationsDisabled true
    }
}

dependencies {
    implementation project(':domain')
    implementation project(':data')
    kapt presentationKaptDependencies
    implementation presentationDependencies
    testImplementation presentationTestDependencies
    androidTestImplementation presentationInstrumentationTestDependencies
}
