title: Add to subproject to gradle jar
body: <p>How can I add a subproject referenced using <code>project(':api')</code> to the jar gradle builds?</p>
  
  <p>This is the <code>build.gradle</code> of my main project. The subproject is includes as git submodule and has a similar buildscript.</p>
  
  <pre><code>apply plugin: 'java'
  
  sourceCompatibility = 1.5
  version = '1.0'
  
  jar {
      manifest {
          attributes('Main-Class': '..........')
      }
  }
  
  repositories {
      mavenCentral()
  }
  
  dependencies {
      compile files('libs/jfxrt.jar')
      compile project(':api')
      testCompile group: 'junit', name: 'junit', version: '4.11'
  }
  </code></pre>