title: how to import the ShadowJar plugin for Kotlin (Gradle) builds?
body: <p>Build failed:</p>
  
  <pre><code>thufir@dur:~/NetBeansProjects/kotlin_dsl$ 
  thufir@dur:~/NetBeansProjects/kotlin_dsl$ gradle clean run 
  
  &gt; Configure project : 
  e: /home/thufir/NetBeansProjects/kotlin_dsl/build.gradle.kts:4:12: Unresolved reference: github
  
  
  FAILURE: Build failed with an exception.
  
  * What went wrong:
  A problem occurred configuring root project 'kotlin_dsl'.
  &gt; Could not open cache directory 74ykawxta6db3b2bfk9grjikp (/home/thufir/.gradle/caches/4.3.1/gradle-kotlin-dsl/74ykawxta6db3b2bfk9grjikp).
     &gt; Internal error: unable to compile script, see log for details
  
  * Try:
  Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
  
  * Get more help at https://help.gradle.org
  
  BUILD FAILED in 1s
  thufir@dur:~/NetBeansProjects/kotlin_dsl$ 
  </code></pre>
  
  <p>problematic import statement:</p>
  
  <pre><code>thufir@dur:~/NetBeansProjects/kotlin_dsl$ 
  thufir@dur:~/NetBeansProjects/kotlin_dsl$ cat build.gradle.kts 
  
  import org.gradle.api.JavaVersion
  import org.gradle.kotlin.dsl.*
  import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
  
  
  plugins {
      application
      kotlin("jvm") version "1.1.51"
  }
  
  application {
      mainClassName = "samples.HelloWorldKt"
  }
  
  dependencies {
      compile(kotlin("stdlib"))
  }
  
  repositories {
      jcenter()
  }
  
  
  thufir@dur:~/NetBeansProjects/kotlin_dsl$ 
  </code></pre>
  
  <p>removing <a href="https://github.com/johnrengelman/shadow/issues/317" rel="nofollow noreferrer">the import for Shadow as described</a> gives a clean build and run.  How is the Shadow plugin JAR made available for Kotlin to import?</p>
  
  <p><em>Gradle itself, using the DSL, creates Shadow JAR's fine.</em></p>
  
  <p>Coming at this from a different angle:</p>
  
  <p><a href="https://stackoverflow.com/q/48661330/262852">Kotlin meets Gradle: gradle.build.kt with ShadowJar</a></p>
  
  <p>with a working build file.</p>