JAL-3130 make sure only libDistDir/*.jar are added to the runtime classpath in shadow...
authorJim Procter <jprocter@issues.jalview.org>
Tue, 23 Apr 2019 16:41:11 +0000 (17:41 +0100)
committerJim Procter <jprocter@issues.jalview.org>
Tue, 23 Apr 2019 16:41:11 +0000 (17:41 +0100)
build.gradle

index bd9db2a..54aed95 100644 (file)
@@ -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()