// Top-level build file where you can add configuration options common to all sub-projects/modules.
apply from: 'dependencies.gradle'

buildscript {
    apply from: 'dependencies.gradle'
    repositories {
        google()
        mavenCentral()
        jcenter()
        gradlePluginPortal()
    }
    dependencies {
        classpath gradlePlugins.androidGradle
        classpath gradlePlugins.shot
        classpath gradlePlugins.mavenPublish
        classpath gradlePlugins.dokka
        classpath gradlePlugins.kotlin
    }

    ext.isCIServer = System.getenv().containsKey("CI")
    logger.warn("Running on CI: ${isCIServer}")
    ext.dokka = "${project.rootDir}/scripts/dokka.gradle"
    ext.dokka_android = "${project.rootDir}/scripts/dokka-android.gradle"
    ext.publishing = "${project.rootDir}/scripts/publishing.gradle"
}

allprojects {
    repositories {
        google()
        mavenCentral()
        jcenter()
        maven { url "https://jitpack.io" }
    }
}

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

tasks.withType(Wrapper).configureEach {
    gradleVersion = versions.gradle
    distributionType = Wrapper.DistributionType.BIN
}
