apply plugin: 'com.android.application'
apply plugin: 'jacoco'

apply from: '../buildsystem/jacoco.gradle'
apply from: '../buildsystem/android_commons.gradle'

android {

    defaultConfig {
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }

    buildTypes {
        debug {
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android.txt'),
                    'proguard-rules.pro'
            testProguardFile 'proguard-test-rules.pro'
        }

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

    packagingOptions {
        exclude 'META-INF/androidx.legacy_legacy-support-core-utils.version'
    }

    dynamicFeatures = []

}

dependencies {
    implementation project(':features:base')
    implementation project(':features:repositories')
    implementation project(':features:repository')

    rootProject.app.each { item ->
        add(item.configuration, item.dependency, item.options)
    }
    rootProject.annotationProcessorsDependencies.each { item ->
        add(item.configuration, item.dependency, item.options)
    }
    rootProject.unitTestsDependencies.each { item ->
        add(item.configuration, item.dependency, item.options)
    }
    rootProject.instrumentationTestsDependencies.each { item ->
        add(item.configuration, item.dependency, item.options)
    }
}