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

buildscript {
    repositories {
        google()
        jcenter()
        maven { url "https://plugins.gradle.org/m2/" }
    }
    dependencies {
        classpath ProjectLib.ANDROID
        classpath ProjectLib.KOTLIN
        classpath ProjectLib.DETEKT
        classpath ProjectLib.KTLINT
        classpath ProjectLib.VERSIONS
        classpath ProjectLib.MAVEN
        classpath ProjectLib.BENCHMARK
    }
}

allprojects {
    apply plugin: 'io.gitlab.arturbosch.detekt'
    apply plugin: 'org.jlleitschuh.gradle.ktlint'
    apply plugin: "com.github.ben-manes.versions"

    detekt {
        config = files("${rootDir}/detekt.yml")
    }
    ktlint {
        android = true
    }
    repositories {
        google()
        jcenter()
        maven { url 'https://jitpack.io' }
    }
    tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
        kotlinOptions {
            jvmTarget = JavaVersion.VERSION_1_8
        }
    }
}

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