52 lines
1.8 KiB
Groovy
52 lines
1.8 KiB
Groovy
apply plugin: 'java'
|
|
apply plugin: 'groovy'
|
|
apply plugin: 'javadocHotfix'
|
|
apply plugin: 'eclipse-wtp'
|
|
apply plugin: 'propdeps'
|
|
apply plugin: 'propdeps-maven'
|
|
apply plugin: 'propdeps-idea'
|
|
apply plugin: 'propdeps-eclipse'
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
maven { url 'http://clojars.org/repo' }
|
|
}
|
|
|
|
// Integration test setup
|
|
configurations {
|
|
integrationTestCompile {
|
|
extendsFrom testCompile, optional, provided
|
|
}
|
|
integrationTestRuntime {
|
|
extendsFrom integrationTestCompile, testRuntime
|
|
}
|
|
}
|
|
|
|
sourceSets {
|
|
integrationTest {
|
|
java.srcDir file('src/integration-test/java')
|
|
groovy.srcDirs file('src/integration-test/groovy')
|
|
resources.srcDir file('src/integration-test/resources')
|
|
compileClasspath = sourceSets.main.output + sourceSets.test.output + configurations.integrationTestCompile
|
|
runtimeClasspath = output + compileClasspath + configurations.integrationTestRuntime
|
|
}
|
|
}
|
|
|
|
task integrationTest(type: Test, dependsOn: jar) {
|
|
testClassesDir = sourceSets.integrationTest.output.classesDir
|
|
logging.captureStandardOutput(LogLevel.INFO)
|
|
classpath = sourceSets.integrationTest.runtimeClasspath
|
|
maxParallelForks = 1
|
|
reports {
|
|
html.destination = project.file("$project.buildDir/reports/integration-tests/")
|
|
junitXml.destination = project.file("$project.buildDir/integration-test-results/")
|
|
}
|
|
}
|
|
|
|
project.conf2ScopeMappings.addMapping(MavenPlugin.TEST_COMPILE_PRIORITY + 1, project.configurations.getByName("integrationTestCompile"), Conf2ScopeMappingContainer.TEST)
|
|
project.conf2ScopeMappings.addMapping(MavenPlugin.TEST_COMPILE_PRIORITY + 2, project.configurations.getByName("integrationTestRuntime"), Conf2ScopeMappingContainer.TEST)
|
|
check.dependsOn integrationTest
|
|
|
|
project.idea.module {
|
|
scopes.TEST.plus += [project.configurations.integrationTestRuntime]
|
|
} |