2. Adding new source set - acichon89/fantacalcio GitHub Wiki

1. Create new source set :
sourceSets {
	    integrationTest {
	    	compileClasspath = compileClasspath + configurations.provided
	        java {
	            compileClasspath += main.output + test.output
	            runtimeClasspath += main.output + test.output
	            srcDir file('src/integration-test/java')
	        }
	        resources.srcDir file('src/integration-test/resources')
	    }
	}
2. Define new task :
task integrationTest(type: Test) {
	    testClassesDir = sourceSets.integrationTest.output.classesDir
	    classpath = sourceSets.integrationTest.runtimeClasspath
	    outputs.upToDateWhen { false }
	    reports.junitXml.destination = file("$buildDir/integration-test-results/")
		reports.html.destination = file("$buildDir/reports/integration-tests/")
	}
3. Right after task definition, define its order :
check.dependsOn integrationTest
integrationTest.dependsOn test