/* * Copyright 2000-2013 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ jar { exclude '**/jetbrains/buildServer/gradle/agent/init/*' } test { description = 'Run unit tests for Gradle Runner plugin. Fast.' useTestNG() scanForTestClasses = false include '**/jetbrains/buildServer/gradle/test/init/*' include '**/jetbrains/buildServer/gradle/test/unit/*' } task integrationTest(type: Test, dependsOn: [assemble, test]) { description = 'Run integration tests for Gradle Runner plugin. Slow.' useTestNG() scanForTestClasses = false exclude '**/jetbrains/buildServer/gradle/test/init/*' exclude '**/jetbrains/buildServer/gradle/test/unit/*' setClasspath configurations.integTestClasspath + files([jar.archivePath, sourceSets.test.output.classesDir]) jvmArgs ("-Dgradle.runtime=${gradle.gradleHomeDir}") } task dist(dependsOn: [build,':gradle-runner-common:build']) { description = 'Create Gradle Runner package for TeamCity Build Agent' doLast { def runnerDir = new File(distsDir,'gradle-runner') def runnerLib = new File(runnerDir,'lib') runnerLib.mkdirs() copy { from project(':gradle-runner-common').libsDir from libsDir into runnerLib } copy { from new File(projectDir,'src/main') include 'scripts/*.*' into runnerDir } } }