dependencies {
    groovy libraries.groovy

    integTestCompile project(':toolingApi')
    integTestCompile project(':launcher')
    integTestCompile libraries.ant
    integTestCompile libraries.xmlunit

    integTestRuntime rootProject.configurations.testRuntime.allDependencies
}

integTestTasks.all {
    dependsOn ':publishLocalArchives', ':binZip', ':allZip', ':srcZip', ':docs:userguideDocbook'

    jvmArgs '-Xmx512m', '-XX:MaxPermSize=256m'

    doFirst {
        systemProperties['integTest.userGuideInfoDir'] = project(':docs').docbookSrc
        systemProperties['integTest.userGuideOutputDir'] = new File(project(':docs').samplesSrcDir, "userguideOutput").absolutePath
        systemProperties['integTest.distsDir'] = rootProject.distsDir.absolutePath
        systemProperties['integTest.libsRepo'] = rootProject.file('build/repo')
        forkEvery = 15

        if (isDevBuild()) {
            exclude 'org/gradle/integtests/DistributionIntegrationTest.*'
            exclude 'org/gradle/integtests/tooling/**/*Suite.*'
        }
    }
}
