Skip to content

Instantly share code, notes, and snippets.

@kevinadi
Created August 13, 2018 01:33
Show Gist options
  • Save kevinadi/873164ad0d8c73c94c49e6a5a2017cea to your computer and use it in GitHub Desktop.
Save kevinadi/873164ad0d8c73c94c49e6a5a2017cea to your computer and use it in GitHub Desktop.
Basic build.gradle with fat jar capability
plugins {
id 'java'
id 'application'
}
mainClassName = 'App'
dependencies {
testCompile 'junit:junit:4.12'
}
repositories {
jcenter()
}
jar {
from {
(configurations.runtime).collect {
it.isDirectory() ? it : zipTree(it)
}
}
manifest {
attributes('Main-Class': 'App' )
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment