title: Building an uberjar with Gradle
body: <p>I want to build an uberjar (AKA fatjar) that includes all the transitive dependencies of the project. What lines do I need to add to <code>build.gradle</code>?</p>
  <p>This is what I currently have:</p>
  <pre><code>task uberjar(type: Jar) {
      from files(sourceSets.main.output.classesDir)
  
      manifest {
          attributes 'Implementation-Title': 'Foobar',
                  'Implementation-Version': version,
                  'Built-By': System.getProperty('user.name'),
                  'Built-Date': new Date(),
                  'Built-JDK': System.getProperty('java.version'),
                  'Main-Class': mainClassName
      }
  }
  </code></pre>