Return to Snippet

Revision: 62787
at March 25, 2013 18:25 by alces


Updated Code
apply plugin: 'java'

task full_jar(type: Jar, dependsOn: classes) {
	manifest {
		attributes 'Main-Class': "${project.group}.Main"
	}
	from configurations.compile.collect {it.directory ? it : zipTree(it)}
	from files(compileJava)
	baseName = "${project.archivesBaseName}-full"
}

Revision: 62786
at March 12, 2013 23:51 by alces


Initial Code
apply plugin: 'java'

task full_jar(type: Jar, dependsOn: classes) {
	manifest {
		attributes 'Main-Class': "${project.group}.Main"
	}
	from configurations.compile.collect {it.directory ? it : zipTree(it)}
	from compileJava.outputs.files.asPath
	baseName = "${project.archivesBaseName}-full"
}

Initial URL
build_gradle_jar_with_dependencies

Initial Description
Custom task using gradle java plugin for build runnable jar file with full dependencies set

Initial Title
Jar with dependencies task for build.gradle

Initial Tags
java

Initial Language
Groovy