Skip to content

Commit

Permalink
extra task to create fat jar via gradle
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiasgeiger committed Aug 6, 2015
1 parent eb70029 commit 1de72af
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ apply plugin: "application"

mainClassName = "de.uniba.dsg.bpmnspector.BPMNspectorMain"

version = 1.0

task wrapper(type: Wrapper) {
gradleVersion = '2.5'
}
Expand Down Expand Up @@ -43,12 +45,14 @@ dependencies {
jar.archiveName = "BPMNspector.jar"

jar {
from configurations.runtime.collect { it.isDirectory() ? it : zipTree(it) }
manifest { attributes 'Main-Class': mainClassName }
}

compileJava {
dependsOn 'zipReportResources'
task fatJar(type: Jar) {
manifest.from jar.manifest
baseName = project.name + '-fat'
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
with jar
}

run {
Expand All @@ -57,12 +61,6 @@ run {
}
}

task zipReportResources(type: Zip) {
archiveName = "reportingResources.zip"
from('src/main/resources/reporting/res')
destinationDir = file('src/main/resources')
}

apply plugin: 'jacoco'
apply plugin: 'com.github.kt3k.coveralls'

Expand Down

0 comments on commit 1de72af

Please sign in to comment.