apply plugin: 'com.github.ben-manes.versions'

buildscript {
    ext.versions = [
            minSdk        : 19,
            targetSdk     : 28,
            compileSdk    : 28,

            kotlin        : '1.3.41',
            supportLibrary: '28.0.0',
    ]

    ext.deps = [
            buildscript        : [
                    kotlin  : "org.jetbrains.kotlin:kotlin-gradle-plugin:${versions.kotlin}",
                    dokka   : 'org.jetbrains.dokka:dokka-android-gradle-plugin:0.9.18',
                    versions: 'com.github.ben-manes:gradle-versions-plugin:0.22.0',
            ],

            // library dependencies
            supportRecyclerView: "com.android.support:recyclerview-v7:${versions.supportLibrary}",
            kotlinStdlib       : "org.jetbrains.kotlin:kotlin-stdlib:${versions.kotlin}",

            // test dependencies
            robolectric        : 'org.robolectric:robolectric:4.3',
            junit              : 'junit:junit:4.12',
            mockitoKotlin      : 'com.nhaarman.mockitokotlin2:mockito-kotlin:2.1.0',
            kotlintest         : 'io.kotlintest:kotlintest-assertions:3.3.2',
            xTest              : 'androidx.test:core:1.1.0',

            // sample dependencies
            supportDesign      : "com.android.support:design:${versions.supportLibrary}"
    ]
    repositories {
        google()
        mavenCentral()
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.4.2'
        classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
        classpath deps.buildscript.versions
    }
}

subprojects {
    version = VERSION_NAME
    group = GROUP

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

    buildscript {
        repositories {
            mavenCentral()
            google()
            jcenter()
        }
        dependencies {
            classpath deps.buildscript.kotlin
        }
    }
}
