title: Partially compile gradle project with java-6 and java-7
body: <p>I want to compile some of my code in my project with java6 and some with java7.  It doesn't seem like I can assign different source/target compatibilities for different source sets.  I know this is a weird setup, but the java7 code depends on some java7 libraries and the java6 code has to be loaded in by some other java6 code (beyond my control)</p>
  
  <p>I've been trying to use a subproject</p>
  
  <pre><code>java7-project
   \build.gradle (compatibility = 1.7, compile project(':java6-submodule'))
   \settings.gradle
   \java6-module
      \build.gradle (compatibility = 1.6)
  </code></pre>
  
  <p>This actually work fine, BUT, I want java6-module to be included as part of java7-project when I create the jar.  I can also do this... using (some code from the internet)</p>
  
  <pre><code>jar {
    from { 
      project(':java6-module').configurations.archives.allArtifacts.files.collect {
        zipTree(it)
      }
    }
  }
  </code></pre>
  
  <p>however, when I run the :install task to put the library in my local maven repo, the generated pom for java7-project has a compile dependency on "java6-module".</p>
  
  <p>I want to be able to compile different sections of code with different java versions while also treating it (or simulating the behavior) as one module?</p>