title: Add a gradle sourceset with folders for java, groovy, and resources
body: <p>I have a multi-module project where one of them adds a sourceSet in order to support 3 source folders</p>
  
  <pre><code>apply plugin: 'groovy'
  apply plugin: 'java'
  
  configurations {
      componentTestCompile.extendsFrom compile, testCompile
      componentTestRuntime.extendsFrom runtime, testRuntime, componentTestCompile
  }
  
  sourceSets {
      componentTest {
          java {
              srcDir 'src/componentTest/java'
          }
          groovy {
              srcDir 'src/componentTest/groovy'
          }
          resources {
              srcDir 'src/componentTest/resources'
          }
          compileClasspath = sourceSets.main.output + configurations.componentTestCompile
          runtimeClasspath = output + compileClasspath + configurations.componentTestRuntime
      }
  }
  
  
  task componentTest(type: Test) {
      testClassesDir = sourceSets.componentTest.output.classesDir
      classpath = sourceSets.componentTest.runtimeClasspath
      reports.html.destination = file("$reports.html.destination/component")
      reports.junitXml.destination = file("$reports.junitXml.destination/component")
  
      println classpath
  }
  
  check.dependsOn componentTest
  </code></pre>
  
  <p>When executing gradle componentTest the Java code is not compiled (the build directory is not populated with the respective class files). 
  However when applying the above sourceSet to a simple project (single module) it works. I'm a bit lost in figuring out what the problem is here. I have been playing with the expressions </p>
  
  <pre><code>compileClasspath = sourceSets.main.output + configurations.componentTestCompile
  runtimeClasspath = output + compileClasspath + configurations.componentTestRuntime
  </code></pre>
  
  <p>But haven't really been able to get closer to a solution.    </p>