Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Assumes 'java', 'groovy' or 'scala' plugins have been applied before
- // Add integration test source sets
- sourceSets {
- integrationTest { sourceSet ->
- ["java", "groovy", "scala", "resources"].each {
- if (!sourceSet.hasProperty(it)) return
- sourceSet."$it".srcDir file("src/integration-test/${it}")
- }
- }
- }
- // Setup dependencies for integration testing
- dependencies {
- integrationTestCompile sourceSets.main.output
- integrationTestCompile sourceSets.test.output
- integrationTestCompile configurations.testCompile
- integrationTestRuntime configurations.testRuntime
- }
- // Define integration test task
- task integrationTest(type: Test) {
- testClassesDir = sourceSets.integrationTest.output.classesDir
- classpath = sourceSets.integrationTest.runtimeClasspath
- }
- // Make sure 'check' task calls integration test
- check.dependsOn integrationTest
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement