From 036d4b5d1a77864fbb7b9f6c84bf5bac30ec450d Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Sat, 9 Mar 2019 07:25:32 +0100 Subject: 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). --- build.gradle | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) 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 } -- cgit v1.2.3-1-g7c22