buildscript {
    ext.versions = [
            minSdk        : 9,
            compileSdk    : 27,
            buildTools    : '27.0.3',

            kotlin        : '1.2.50',
            supportLibrary: '27.1.1',
    ]

    ext.deps = [
            buildscript  : [
                    dokka: 'org.jetbrains.dokka:dokka-android-gradle-plugin:0.9.16',
                    bintray: 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.2',
            ],

            // library dependencies
            kotlinStdlib : "org.jetbrains.kotlin:kotlin-stdlib:${versions.kotlin}",
            timber       : 'com.jakewharton.timber:timber:4.7.1',

            // test dependencies
            robolectric  : 'org.robolectric:robolectric:3.8',
            junit        : 'junit:junit:4.12',
            mockito      : 'org.mockito:mockito-core:2.18.0',
            mockitoKotlin: 'com.nhaarman:mockito-kotlin:1.5.0',
            assertj      : 'org.assertj:assertj-core:3.9.1',
    ]

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

    dependencies {
        classpath 'com.android.tools.build:gradle:3.1.3'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${versions.kotlin}"
        classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
    }
}

subprojects {
    version = VERSION_NAME
    group = GROUP

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

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

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