//java configuration and project layout subprojects { apply plugin: 'java' sourceSets { main { java { srcDir 'src' } resources { srcDir 'resources'} output.classesDir = "${output.classesDir}/${project.name}" output.resourcesDir = "${output.resourcesDir}/${project.name}" } test { java { srcDir 'tests/src' } resources { srcDir 'tests/resources'} output.classesDir = "${output.classesDir}/${project.name}" } } testReportDirName = "tests-${name}" compileJava { sourceCompatibility = 1.8 targetCompatibility = 1.8 options.encoding = "UTF-8" } test { maxParallelForks=4 ignoreFailures=true } //if a project has generated files in the 'generated' directory clean them clean { doLast { project.delete "generated" } } }