From: Jim Procter Date: Tue, 23 Apr 2019 16:41:11 +0000 (+0100) Subject: JAL-3130 make sure only libDistDir/*.jar are added to the runtime classpath in shadow... X-Git-Tag: Release_2_11_0~17^2~7^2~11 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=d9bf590cfffd99886c318b46d88f2dbeda5113f0;p=jalview.git JAL-3130 make sure only libDistDir/*.jar are added to the runtime classpath in shadowJar and makeDist --- 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()