39 lines
1.1 KiB
Groovy
39 lines
1.1 KiB
Groovy
// This is based upon what Rob Fletcher has done at
|
|
// https://raw.githubusercontent.com/robfletcher/gradle-compass/master/gradle/integration-tests.gradle
|
|
|
|
configurations {
|
|
integrationTestCompile {
|
|
extendsFrom testCompile
|
|
}
|
|
integrationTestRuntime {
|
|
extendsFrom integrationTestCompile, testRuntime
|
|
}
|
|
integrationTestGems
|
|
}
|
|
|
|
sourceSets {
|
|
integrationTest {
|
|
java.srcDir file("src/integTest/java")
|
|
groovy.srcDir file("src/integTest/groovy")
|
|
resources.srcDir file("src/integTest/resources")
|
|
compileClasspath = sourceSets.main.output + configurations.integrationTestCompile
|
|
runtimeClasspath = output + compileClasspath + configurations.integrationTestRuntime
|
|
}
|
|
}
|
|
|
|
task copyIntegrationTestGems (type:Copy) {
|
|
from ({configurations.integrationTestGems.files})
|
|
into new File(buildDir,'tmp/integrationTest/flatRepo')
|
|
}
|
|
|
|
task integrationTest(type: Test, dependsOn: jar) {
|
|
testClassesDir = sourceSets.integrationTest.output.classesDir
|
|
classpath = sourceSets.integrationTest.runtimeClasspath
|
|
mustRunAfter test
|
|
dependsOn copyIntegrationTestGems
|
|
}
|
|
|
|
check.dependsOn integrationTest
|
|
|
|
|