Useful Configurations

Setting Source / Test Directories

With the java plugin applied, add:

sourceSets {
    main.groovy.srcDir("src/main/java")
    test.java.srcDir("src/main/test")
}

Specify multiple directories:

sourceSets {
    test.java.srcDirs("src/test/java", "src/integration-test/java")
}