title: Upload sources to nexus repository with gradle
body: <p>I successfully uploaded my jars to a nexus repository using the maven plugin for gradle but it didn't upload the sources. This is my configuration:</p>
  
  <pre><code>uploadArchives {
      repositories{
          mavenDeployer {
              repository(url: "http://...") {
                   authentication(userName: "user", password: "myPassword")
              }
          }
      }
  }
  </code></pre>
  
  <p>I searched and found that I can add the sources by adding a new task. </p>
  
  <pre><code>task sourcesJar(type: Jar, dependsOn:classes) {
       classifier = 'sources'
       from sourceSets.main.allSource
  }
  
  artifacts {
       archives sourcesJar
  }
  </code></pre>
  
  <p>This works fine but I think there must be a better solution by configuring the maven plugin, something like uploadSource = true like this: </p>
  
  <pre><code>uploadArchives {
      repositories{
          mavenDeployer {
              repository(url: "http://...") {
                   authentication(userName: "user", password: "myPassword")
              }
              uploadSources = true
          }
      }
  }
  </code></pre>