allprojects {
    apply plugin: "java"
    apply plugin: "idea"
    apply plugin: "eclipse"
    apply plugin: "maven"

    version="$gcplotVersion"

    repositories {
        mavenLocal()
        mavenCentral()
        maven {
            url "http://mvn.gcplot.com"
        }
    }

    dependencies {
        compile "org.slf4j:slf4j-api:$slf4jVersion"
        compile "ch.qos.logback:logback-classic:$logbackVersion"
        compile "com.google.guava:guava:$guavaVersion"
        compile "joda-time:joda-time:$jodaTimeVersion"
        compile group: 'com.google.code.findbugs', name: 'jsr305', version: '3.0.1'

        testCompile "junit:junit:$junitVersion"
        testCompile "org.easymock:easymock:$easymockVersion"
    }

    def forks = Math.max(1, (int) (Runtime.runtime.availableProcessors() / 2))

    test {
        minHeapSize = "512m"
        maxParallelForks = forks
        forkEvery = 1

        testLogging {
            showExceptions = true
            showCauses = true
            showStackTraces = true
            events "passed", "skipped", "failed", "standardOut", "standardError"
        }
    }
}

task testReport(type: TestReport) {
    destinationDir = file("$buildDir/reports/allTests")
    // Include the results from the `test` task in all subprojects
    reportOn subprojects*.test
}