From d9bf590cfffd99886c318b46d88f2dbeda5113f0 Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Tue, 23 Apr 2019 17:41:11 +0100 Subject: [PATCH] JAL-3130 make sure only libDistDir/*.jar are added to the runtime classpath in shadowJar and makeDist --- build.gradle | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/build.gradle b/build.gradle index bd9db2a..54aed95 100644 --- a/build.gradle +++ b/build.gradle @@ -73,7 +73,7 @@ sourceSets { resources { srcDirs "$jalviewDir/$resourceDir" - srcDirs "$jalviewDir/$libDir" + srcDirs "$jalviewDir/$libDistDir" } jar.destinationDir = file("$jalviewDir/$packageDir") @@ -296,8 +296,8 @@ task copyHelp(type: Copy) { } task syncLib(type: Sync) { - def syncDir = "$classes/$libDir" - from fileTree("$jalviewDir/$libDir") + def syncDir = "$classes/$libDistDir" + from fileTree("$jalviewDir/$libDistDir") into syncDir } @@ -422,7 +422,7 @@ task copyJars(type: Copy) { // doing a Sync instead of Copy as Copy doesn't deal with "outputs" very well task syncJars(type: Sync) { - from fileTree("$jalviewDir/$libDir").include("**/*.jar").include("*.jar").files + from fileTree("$jalviewDir/$libDistDir").include("**/*.jar").include("*.jar").files into "$jalviewDir/$packageDir" preserve { include jar.archiveName @@ -447,10 +447,8 @@ task cleanDist { shadowJar { dependsOn makeDist - if (JAVA_VERSION.equals("11")) { - from ("$jalviewDir/$j11libDir") { + from ("$jalviewDir/$libDistDir") { include("*.jar") - } } mainClassName = shadowJarMainClass mergeServiceFiles() -- 1.7.10.2