title: gradle task uploadArchives does not work
body: <p>I have a gradle project executed from jenkins which should only checkout existing libraries from a repository and upload them to artifactory. The checkout is working successfully, but executing uploadArchives is throwing a MissingMethodException:</p>
  
  <pre><code>Caused by: org.gradle.api.internal.MissingMethodException: Could not find method archives() for arguments [{file=/var/lib/jenkins/jobs/Libs/workspace/libphonenumber.jar, name=libphonenumber, type=jar}] on root project 'workspace'.
  </code></pre>
  
  <p>uploadArchives:</p>
  
  <pre><code>uploadArchives {
    println "I'm here: uploadArchives" 
    archives file: file('libphonenumber-5.7.jar'), name: 'libphonenumber', type: 'jar'
    archives file: file('log4j-1.2.17.jar'), name: 'log4j', type: 'jar'
  }
  </code></pre>
  
  <p>What's the problem?</p>
  
  <p>Thanks</p>