title: Gradle: Why is the sourceSets.main.output available but other ones not?
body: <p>Ok I am using gradle to compile 4 sourceSets one is main and the other 3 are other small pieces of code being loaded by reflection based on the other classes available later in the "server".</p>
  
  <p>so far this works</p>
  
  <pre><code>        configurations {
              extralibs
              worldguard5
              worldguard6
              worldguard613
          }
      sourceSets {
          main {
              java {
                  srcDir 'src/main/java'
              }
          }
          wg5 {
              compileClasspath = configurations.worldguard5
              java {
                  srcDir 'src/worldguard5/java'
              }
          }
          wg6 {
              compileClasspath = configurations.worldguard6
              java {
                  srcDir 'src/worldguard6/java'
              }
          }
          wg613 {
              compileClasspath = configurations.worldguard613
              java {
                  srcDir 'src/worldguard613/java'
              }
          }
  dependencies {
      compile 'mysql:mysql-connector-java:5.1.13'
      compile 'org.xerial:sqlite-jdbc:3.7.2'
      compile 'com.sk89q:worldguard:6.0.0-SNAPSHOT'
      compile 'com.sk89q:worldedit:5.5.9-SNAPSHOT'
      worldguard5 sourceSets.main.output
      worldguard5 'com.sk89q:worldguard:5.9.1-SNAPSHOT'
      worldguard5 'com.sk89q:worldedit:5.5.9-SNAPSHOT'
      worldguard6 sourceSets.main.output
      worldguard6 'com.sk89q:worldguard:6.0.0-SNAPSHOT'
      worldguard6 'com.sk89q:worldedit:5.5.9-SNAPSHOT'
      worldguard613 sourceSets.wg6.output
      worldguard613 'com.sk89q.worldguard:worldguard-legacy:6.1.3-SNAPSHOT'
      worldguard613 'com.sk89q:worldedit:5.5.9-SNAPSHOT'
  }
  </code></pre>
  
  <p>Now all works except for </p>
  
  <p>worldguard613 sourceSets.wg6.output</p>
  
  <p>which is giving the error</p>
  
  <pre><code>&gt; Could not get unknown property 'worldguard6' for SourceSet container.
  </code></pre>
  
  <p>Any ideas?</p>
  
  <p>========================================
  Update It works. The accepted answer works</p>
  
  <pre><code>dependencies {
      compile fileTree(dir: 'lib', include: '*.jar')
      compile 'org.json:json:20090211'
      compile 'javax.validation:validation-api:1.1.0.Final'
      compile 'mysql:mysql-connector-java:5.1.13'
      compile 'org.xerial:sqlite-jdbc:3.7.2'
      compile 'com.sk89q:worldguard:6.0.0-SNAPSHOT'
      compile 'com.sk89q:worldedit:5.5.9-SNAPSHOT'
      worldguard5 sourceSets.main.output
      worldguard5 'com.sk89q:worldguard:5.9.1-SNAPSHOT'
      worldguard5 'com.sk89q:worldedit:5.5.9-SNAPSHOT'
      worldguard6 sourceSets.main.output
      worldguard6 'com.sk89q:worldguard:6.0.0-SNAPSHOT'
      worldguard6 'com.sk89q:worldedit:5.5.9-SNAPSHOT'
      worldguard613 sourceSets.main.output
      worldguard613 'com.sk89q.worldguard:worldguard-legacy:6.1.3-SNAPSHOT'
      worldguard613 'com.sk89q:worldedit:5.5.9-SNAPSHOT'
      testCompile 'junit:junit:4.12'
  }
  
  
  
  sourceSets {
      main {
          java {
              srcDir 'src/main/java'
          }
      }
      wg5 {
          compileClasspath = configurations.worldguard5
          java {
              srcDir 'src/worldguard5/java'
          }
      }
      wg6 {
          compileClasspath = configurations.worldguard6
          java {
              srcDir 'src/worldguard6/java'
          }
      }
      wg613 {
          compileClasspath = configurations.worldguard613 + wg6.output
          java {
              srcDir 'src/worldguard613/java'
          }
      }
  }
  </code></pre>