diff options
author | Alexander Sulfrian <asulfrian@zedat.fu-berlin.de> | 2019-03-09 07:25:32 +0100 |
---|---|---|
committer | Alexander Sulfrian <asulfrian@zedat.fu-berlin.de> | 2019-03-09 07:25:32 +0100 |
commit | 036d4b5d1a77864fbb7b9f6c84bf5bac30ec450d (patch) | |
tree | 05b24140619ff5e7d5dbd558e777e10ec124de58 | |
parent | 5514a9a5a1fbf0204927300a5af73c251cdf3799 (diff) | |
download | kvm-036d4b5d1a77864fbb7b9f6c84bf5bac30ec450d.tar.gz kvm-036d4b5d1a77864fbb7b9f6c84bf5bac30ec450d.tar.bz2 kvm-036d4b5d1a77864fbb7b9f6c84bf5bac30ec450d.zip |
Change grade build process
The jar with dependencies is generated by a new task now and we are ensuring,
that the sources are added first to the JAR (We want to override the classes
from the applet).
-rw-r--r-- | build.gradle | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/build.gradle b/build.gradle index 9719996..ad9610a 100644 --- a/build.gradle +++ b/build.gradle @@ -18,7 +18,21 @@ jar { manifest { attributes 'Main-Class': 'de.spline.kvm.Launcher' } +} + +task fatJar(type: Jar) { + dependsOn jar + + manifest.from jar.manifest + destinationDir = file("$rootDir/build/") duplicatesStrategy = DuplicatesStrategy.EXCLUDE - from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } } + from { sourceSets.main.output } + from { configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) } } + + with jar +} + +artifacts { + archives fatJar } |