Last active
August 29, 2015 14:15
-
-
Save liyuntao/70c74e77c7b36dd6782b to your computer and use it in GitHub Desktop.
build a fat jar with all dependency inside with Gradle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment