Skip to content

Commit

Permalink
"gradle uberjar" to create a fat jar with all dependencies
Browse files Browse the repository at this point in the history
This way, Dahu can be ran with

  java -jar build/libs/Dahu-0.1-SNAPSHOT.jar

The bundles generated by "gradle build" are supposedly superior, but
just don't work for me.
  • Loading branch information
moy committed Oct 13, 2013
1 parent 4d8ead0 commit ba54376
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions editor/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -136,3 +136,11 @@ javafx {
scale = 1
}
}

/* "gradle uberjar" makes a jar with all dependencies in */
task uberjar(type: Jar) {
dependsOn configurations.runtime
manifest.attributes('Main-Class': 'io.dahuapp.editor.app.DahuApp')
from sourceSets.main.output
from { configurations.runtime.collect { it.isDirectory() ? it : zipTree(it) } }
}

0 comments on commit ba54376

Please sign in to comment.