apply from: 'dependencies.gradle'

buildscript {
    ext.kotlinVersion = '1.3.72'
    repositories {
        google()
        mavenCentral()
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:4.0.0'
        classpath "org.jetbrains.kotlin:kotlin-android-extensions:$kotlinVersion"
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
        classpath "android.arch.navigation:navigation-safe-args-gradle-plugin:1.0.0"
    }
}

allprojects {
    repositories {
        google()
        mavenCentral()
        jcenter()
    }
}

task runDomainTests(dependsOn: [':domain:test']) {
    description 'Run tests for the domain layer.'
}

task runDataTests(dependsOn: [':data:cleanTestDebugUnitTest', ':data:testDebugUnitTest', 'data:connectedAndroidTest']) {
    description 'Run tests for the data layer.'
}

task runAllTests(dependsOn: ['runDomainTests',
                             'runDataTests',
                             'presentation:cleanTestDebugUnitTest',
                             'presentation:testDebugUnitTest',
                             ':presentation:connectedAndroidTest']) {

    description 'Run application tests.'
}

task clean(type: Delete) {
    delete rootProject.buildDir
}