Skip to content

Instantly share code, notes, and snippets.

@pcholt
Created July 5, 2017 07:50
Show Gist options
  • Save pcholt/177cfe06597582276f4c85ecf01c9da9 to your computer and use it in GitHub Desktop.
Save pcholt/177cfe06597582276f4c85ecf01c9da9 to your computer and use it in GitHub Desktop.
Build an excecutable jar from Kotlin
jar {
manifest {
attributes 'Main-Class': 'com.overswell.MainKt'
}
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
}
@pcholt
Copy link
Author

pcholt commented Jul 5, 2017

Add this at the end of your build.gradle to create a fat jar with a Main class.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment