title: How to create a fat JAR with Gradle Kotlin script?
body: <p>As titled, I'd like to know how to modify the <code>gradle.build.kts</code> in order to have a task to create a unique <code>jar</code> with all the dependencies (kotlin lib included) inside.</p>
  
  <p>I found this sample in Groovy:</p>
  
  <pre><code>//create a single Jar with all dependencies
  task fatJar(type: Jar) {
      manifest {
          attributes 'Implementation-Title': 'Gradle Jar File Example',
              'Implementation-Version': version,
              'Main-Class': 'com.mkyong.DateUtils'
      }
      baseName = project.name + '-all'
      from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
      with jar
  }
  </code></pre>
  
  <p>But I have no idea how I could write that in kotlin, other than:</p>
  
  <pre><code>task("fatJar") {
  
  }
  </code></pre>