buildscript {
    ext {
        glide_version = '4.16.0'
        abiCodes = ['armeabi-v7a': 1, 'arm64-v8a': 2, 'x86': 3, 'x86_64': 4]
        useCrashlytics = gradle.startParameter.taskNames.any { task -> task.containsIgnoreCase("play") }
    }

    repositories {
        google()
        mavenCentral()
    }

    dependencies {
        if (useCrashlytics) {
            // GMS & Firebase Crashlytics (used by some flavors only)
            classpath 'com.google.gms:google-services:4.4.1'
            classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.9'
        }
    }
}

allprojects {
    repositories {
        google()
        mavenCentral()
    }

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

rootProject.buildDir = '../build'
subprojects {
    project.buildDir = "${rootProject.buildDir}/${project.name}"
    project.evaluationDependsOn(':app')
}

tasks.register('clean', Delete) {
    delete rootProject.buildDir
}
