buildscript {
    repositories {
        jcenter()
        maven {
            url "https://maven.google.com"
        }
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.3.3'

        // Better IDE support for annotations (so Android Studio interacts better with Dagger)
        classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        jcenter()
        maven {
            url "https://maven.google.com"
        }
    }
}

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

// Define versions in a single place
ext {
    // Sdk and tools
    minSdkVersion = 14
    targetSdkVersion = 26
    compileSdkVersion = 26
    buildToolsVersion = '26.0.1'

    // App dependencies
    supportLibraryVersion = '26.0.0'
    guavaVersion = '18.0'
    junitVersion = '4.12'
    mockitoVersion = '1.10.19'
    powerMockito = '1.6.2'
    hamcrestVersion = '1.3'
    runnerVersion = '1.0.0'
    rulesVersion = '1.0.0'
    espressoVersion = '3.0.0'
    daggerVersion = '2.11'
    dexmakerVersion = '1.2'
}

//When there is an error in code generation you will may see
//lots of errors due too missing generated code in your logs, we increase
//how many errors are shown here so that the real error is visible when it is near the end
allprojects {
    afterEvaluate {
        tasks.withType(JavaCompile.class) {
            options.compilerArgs << "-Xmaxerrs" << "500"
        }
    }
}
