buildscript {
    apply from: rootProject.file("gradle/versions.gradle")

    repositories {
        google()
        mavenCentral()
    }

    dependencies {
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${rootProject.ext.kotlinVersion}"
        classpath "com.android.tools.build:gradle:$rootProject.ext.gradleVersion"
        classpath "net.serenity-bdd:serenity-gradle-plugin:1.9.6"
    }
}

allprojects {
    repositories {
        google()
        mavenCentral()
         // Adding here because Travis cannot access AndroidADAL feed.
        maven {
            url 'https://pkgs.dev.azure.com/MicrosoftDeviceSDK/DuoSDK-Public/_packaging/Duo-SDK-Feed%40Local/maven/v1'
            name 'Duo-SDK-Feed@Local'
        }
    }

    gradle.projectsEvaluated {
        tasks.withType(JavaCompile) {
            options.compilerArgs << "-Xlint:unchecked"
        }
    }

    tasks.withType(Javadoc) {
        options.addStringOption('Xdoclint:none', '-quiet')
    }

    dependencyLocking {
        lockAllConfigurations()
    }
}


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