import app.akane.Deps

buildscript {

    repositories {
        google()
        jcenter()
        maven { url 'https://oss.jfrog.org/artifactory/oss-snapshot-local/' }

    }

    dependencies {
        classpath 'com.android.tools.build:gradle:3.5.0-beta02'
        classpath Deps.Kotlin.gradlePlugin
        classpath Deps.Kotlin.gradlePlugin
    }


}

plugins {
    id "com.diffplug.gradle.spotless" version "3.23.0"
    id 'com.github.ben-manes.versions' version "0.21.0"
}

allprojects {
    repositories {
        google()
        jcenter()
        maven { url 'https://oss.jfrog.org/artifactory/oss-snapshot-local/' }
    }
}

subprojects {
    apply plugin: 'com.diffplug.gradle.spotless'
    spotless {
        kotlin {
            target "**/*.kt"
            ktlint(Deps.Versions.ktlint)
        }
    }
}

allprojects {

    tasks.withType(JavaCompile).all {
        options.compilerArgs += [
                "-Adagger.gradle.incremental=enabled"
        ]
    }

    afterEvaluate {
        extensions.findByName('kapt')?.arguments {
            arg("dagger.formatGeneratedSource", "disabled")
            arg("dagger.gradle.incremental", "enabled")
        }
    }
}
