apply plugin: 'com.github.ben-manes.versions'

buildscript {
    repositories {
        jcenter()
    }

    dependencies {
        // NOTE: Always use fixed version codes not dynamic ones, e.g. 0.7.3 instead of 0.7.+, see README for more information
        classpath 'com.android.tools.build:gradle:2.2.3'
        classpath files('gradle-witness.jar')
        // bintray dependency to satisfy dependency of openpgp-api lib
        classpath 'com.novoda:bintray-release:0.2.7'

        classpath 'org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.6.3'

        // allows to check for lib updates with "./gradlew dependencyUpdates -Drevision=release"
        classpath 'com.github.ben-manes:gradle-versions-plugin:0.13.0'

        classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
    }
}

allprojects {
    repositories {
        jcenter()
    }
}

task wrapper(type: Wrapper) {
    gradleVersion = '3.3'
}

subprojects {
    tasks.withType(Test) {
        maxParallelForks = 1
    }
}

// Ignore tests for external bouncycastle
project(':extern:bouncycastle') {
    subprojects {
        // Need to re-apply the plugin here otherwise the test property below can't be set.
        apply plugin: 'java'
        test.enabled = false
    }
}

// SDK Version and Build Tools used by all subprojects
// See http://tools.android.com/tech-docs/new-build-system/tips#TOC-Controlling-Android-properties-of-all-your-modules-from-the-main-project.
ext {
    compileSdkVersion = 25
    buildToolsVersion = '25.0.2'
}
