Skip to content
This repository has been archived by the owner on Jun 2, 2019. It is now read-only.

Commit

Permalink
Add fatJar task
Browse files Browse the repository at this point in the history
  • Loading branch information
dethi committed Dec 9, 2017
1 parent 3c815d2 commit 36bb79a
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 4 deletions.
26 changes: 26 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,17 @@ group 'com.epita'
version '1.0-SNAPSHOT'

apply plugin: 'java'
apply plugin: 'application'
apply plugin: 'idea'

sourceCompatibility = 1.8
mainClassName = 'com.epita.guereza.Main'

jar {
manifest {
attributes 'Main-Class': mainClassName
}
}

repositories {
mavenCentral()
Expand All @@ -21,3 +30,20 @@ dependencies {
compile group: 'com.fasterxml.jackson.core', name: 'jackson-annotations', version: '2.9.2'
compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.9.2'
}

task fatJar(type: Jar) {
manifest.from jar.manifest
classifier = 'all'
from {
configurations.runtime.collect { it.isDirectory() ? it : zipTree(it) }
} {
exclude "META-INF/*.SF"
exclude "META-INF/*.DSA"
exclude "META-INF/*.RSA"
}
with jar
}

artifacts {
archives fatJar
}
5 changes: 2 additions & 3 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#Wed Dec 06 11:49:18 CET 2017
distributionUrl=https\://services.gradle.org/distributions/gradle-4.3.1-bin.zip
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.0-all.zip
zipStoreBase=GRADLE_USER_HOME
1 change: 0 additions & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,3 @@ include 'domain', ':main'
include 'winter', ':main'
include 'eventbus', ':main'
include 'eventsourcing', ':main'

0 comments on commit 36bb79a

Please sign in to comment.