Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

gradle fatjar

//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
}
Source by mkyong.com #
 
PREVIOUS NEXT
Tagged: #gradle #fatjar
ADD COMMENT
Topic
Name
2+6 =