Answers for "gradle create fat jar"

1

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
}
Posted by: Guest on August-11-2020

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language