I have a custom compile task.
task compileSpeedTest(type: JavaCompile) { classpath = files(\'build\') source = fileTree(\'src/test/java/speed\')
For Intellij go to View > Tool Windows > Gradle > Refresh All Projects (the blue circular arrows at the top of the Gradle window.