JAL-3783 Updated build process to allow multiple groovy-* jars to work within the...
authorBen Soares <b.soares@dundee.ac.uk>
Fri, 13 Oct 2023 15:09:11 +0000 (16:09 +0100)
committerBen Soares <b.soares@dundee.ac.uk>
Fri, 13 Oct 2023 15:09:11 +0000 (16:09 +0100)
55 files changed:
build.gradle
j11lib/groovy-2.5.23.jar [new file with mode: 0644]
j11lib/groovy-all-2.4.21-indy.jar [deleted file]
j11lib/groovy-ant-2.5.23.jar [new file with mode: 0644]
j11lib/groovy-bsf-2.5.23.jar [new file with mode: 0644]
j11lib/groovy-cli-commons-2.5.23.jar [new file with mode: 0644]
j11lib/groovy-cli-picocli-2.5.23.jar [new file with mode: 0644]
j11lib/groovy-console-2.5.23.jar [new file with mode: 0644]
j11lib/groovy-datetime-2.5.23.jar [new file with mode: 0644]
j11lib/groovy-dateutil-2.5.23.jar [new file with mode: 0644]
j11lib/groovy-docgenerator-2.5.23.jar [new file with mode: 0644]
j11lib/groovy-groovydoc-2.5.23.jar [new file with mode: 0644]
j11lib/groovy-groovysh-2.5.23.jar [new file with mode: 0644]
j11lib/groovy-jaxb-2.5.23.jar [new file with mode: 0644]
j11lib/groovy-jmx-2.5.23.jar [new file with mode: 0644]
j11lib/groovy-json-2.5.23.jar [new file with mode: 0644]
j11lib/groovy-json-direct-2.5.23.jar [new file with mode: 0644]
j11lib/groovy-jsr223-2.5.23.jar [new file with mode: 0644]
j11lib/groovy-macro-2.5.23.jar [new file with mode: 0644]
j11lib/groovy-nio-2.5.23.jar [new file with mode: 0644]
j11lib/groovy-servlet-2.5.23.jar [new file with mode: 0644]
j11lib/groovy-sql-2.5.23.jar [new file with mode: 0644]
j11lib/groovy-swing-2.5.23.jar [new file with mode: 0644]
j11lib/groovy-templates-2.5.23.jar [new file with mode: 0644]
j11lib/groovy-test-2.5.23.jar [new file with mode: 0644]
j11lib/groovy-test-junit5-2.5.23.jar [new file with mode: 0644]
j11lib/groovy-testng-2.5.23.jar [new file with mode: 0644]
j11lib/groovy-xml-2.5.23.jar [new file with mode: 0644]
j8lib/groovy-2.5.23.jar [new file with mode: 0644]
j8lib/groovy-all-2.4.21-indy.jar [deleted file]
j8lib/groovy-ant-2.5.23.jar [new file with mode: 0644]
j8lib/groovy-bsf-2.5.23.jar [new file with mode: 0644]
j8lib/groovy-cli-commons-2.5.23.jar [new file with mode: 0644]
j8lib/groovy-cli-picocli-2.5.23.jar [new file with mode: 0644]
j8lib/groovy-console-2.5.23.jar [new file with mode: 0644]
j8lib/groovy-datetime-2.5.23.jar [new file with mode: 0644]
j8lib/groovy-dateutil-2.5.23.jar [new file with mode: 0644]
j8lib/groovy-docgenerator-2.5.23.jar [new file with mode: 0644]
j8lib/groovy-groovydoc-2.5.23.jar [new file with mode: 0644]
j8lib/groovy-groovysh-2.5.23.jar [new file with mode: 0644]
j8lib/groovy-jaxb-2.5.23.jar [new file with mode: 0644]
j8lib/groovy-jmx-2.5.23.jar [new file with mode: 0644]
j8lib/groovy-json-2.5.23.jar [new file with mode: 0644]
j8lib/groovy-json-direct-2.5.23.jar [new file with mode: 0644]
j8lib/groovy-jsr223-2.5.23.jar [new file with mode: 0644]
j8lib/groovy-macro-2.5.23.jar [new file with mode: 0644]
j8lib/groovy-nio-2.5.23.jar [new file with mode: 0644]
j8lib/groovy-servlet-2.5.23.jar [new file with mode: 0644]
j8lib/groovy-sql-2.5.23.jar [new file with mode: 0644]
j8lib/groovy-swing-2.5.23.jar [new file with mode: 0644]
j8lib/groovy-templates-2.5.23.jar [new file with mode: 0644]
j8lib/groovy-test-2.5.23.jar [new file with mode: 0644]
j8lib/groovy-test-junit5-2.5.23.jar [new file with mode: 0644]
j8lib/groovy-testng-2.5.23.jar [new file with mode: 0644]
j8lib/groovy-xml-2.5.23.jar [new file with mode: 0644]

index 8ac2757..0a7fe70 100644 (file)
@@ -52,7 +52,7 @@ plugins {
   id 'application'
   id 'eclipse'
   id "com.diffplug.gradle.spotless" version "3.28.0"
-  id 'com.github.johnrengelman.shadow' version '4.0.3'
+  id 'com.github.johnrengelman.shadow' version '7.1.2'
   id 'com.install4j.gradle' version '10.0.3'
   id 'com.dorongold.task-tree' version '2.1.1' // only needed to display task dependency tree with  gradle task1 [task2 ...] taskTree
   id 'com.palantir.git-version' version '0.13.0' apply false
@@ -2154,12 +2154,33 @@ shadowJar {
   if (buildDist) {
     dependsOn makeDist
   }
-  from ("${jalviewDir}/${libDistDir}") {
-    include("*.jar")
-  }
-  manifest {
-    attributes "Implementation-Version": JALVIEW_VERSION,
-    "Application-Name": applicationName
+
+  def jarFiles = fileTree(dir: "${jalviewDir}/${libDistDir}", include: "*.jar", exclude: "regex.jar").getFiles()
+  def groovyJars = jarFiles.findAll {it1 -> file(it1).getName().startsWith("groovy-swing")}
+  def otherJars = jarFiles.findAll {it2 -> !file(it2).getName().startsWith("groovy-swing")}
+  from groovyJars
+  from otherJars
+
+  // we need to include the groovy-swing Include-Package for it to run in the shadowJar
+  doFirst {
+    def jarFileManifests = []
+    groovyJars.each { jarFile ->
+      def mf = zipTree(jarFile).getFiles().find { it.getName().equals("MANIFEST.MF") }
+      if (mf != null) {
+        jarFileManifests += mf
+      }
+    }
+
+    manifest {
+      attributes "Implementation-Version": JALVIEW_VERSION, "Application-Name": applicationName
+      from (jarFileManifests) {
+        eachEntry { details ->
+          if (!details.key.equals("Import-Package")) {
+            details.exclude()
+          }
+        }
+      }
+    }
   }
 
   duplicatesStrategy "INCLUDE"
diff --git a/j11lib/groovy-2.5.23.jar b/j11lib/groovy-2.5.23.jar
new file mode 100644 (file)
index 0000000..70ac7a0
Binary files /dev/null and b/j11lib/groovy-2.5.23.jar differ
diff --git a/j11lib/groovy-all-2.4.21-indy.jar b/j11lib/groovy-all-2.4.21-indy.jar
deleted file mode 100644 (file)
index 15ee98d..0000000
Binary files a/j11lib/groovy-all-2.4.21-indy.jar and /dev/null differ
diff --git a/j11lib/groovy-ant-2.5.23.jar b/j11lib/groovy-ant-2.5.23.jar
new file mode 100644 (file)
index 0000000..0cd3364
Binary files /dev/null and b/j11lib/groovy-ant-2.5.23.jar differ
diff --git a/j11lib/groovy-bsf-2.5.23.jar b/j11lib/groovy-bsf-2.5.23.jar
new file mode 100644 (file)
index 0000000..9131626
Binary files /dev/null and b/j11lib/groovy-bsf-2.5.23.jar differ
diff --git a/j11lib/groovy-cli-commons-2.5.23.jar b/j11lib/groovy-cli-commons-2.5.23.jar
new file mode 100644 (file)
index 0000000..ebdcff9
Binary files /dev/null and b/j11lib/groovy-cli-commons-2.5.23.jar differ
diff --git a/j11lib/groovy-cli-picocli-2.5.23.jar b/j11lib/groovy-cli-picocli-2.5.23.jar
new file mode 100644 (file)
index 0000000..56a828b
Binary files /dev/null and b/j11lib/groovy-cli-picocli-2.5.23.jar differ
diff --git a/j11lib/groovy-console-2.5.23.jar b/j11lib/groovy-console-2.5.23.jar
new file mode 100644 (file)
index 0000000..99e4cd4
Binary files /dev/null and b/j11lib/groovy-console-2.5.23.jar differ
diff --git a/j11lib/groovy-datetime-2.5.23.jar b/j11lib/groovy-datetime-2.5.23.jar
new file mode 100644 (file)
index 0000000..01137f9
Binary files /dev/null and b/j11lib/groovy-datetime-2.5.23.jar differ
diff --git a/j11lib/groovy-dateutil-2.5.23.jar b/j11lib/groovy-dateutil-2.5.23.jar
new file mode 100644 (file)
index 0000000..1b1f493
Binary files /dev/null and b/j11lib/groovy-dateutil-2.5.23.jar differ
diff --git a/j11lib/groovy-docgenerator-2.5.23.jar b/j11lib/groovy-docgenerator-2.5.23.jar
new file mode 100644 (file)
index 0000000..0a46759
Binary files /dev/null and b/j11lib/groovy-docgenerator-2.5.23.jar differ
diff --git a/j11lib/groovy-groovydoc-2.5.23.jar b/j11lib/groovy-groovydoc-2.5.23.jar
new file mode 100644 (file)
index 0000000..d45f1f5
Binary files /dev/null and b/j11lib/groovy-groovydoc-2.5.23.jar differ
diff --git a/j11lib/groovy-groovysh-2.5.23.jar b/j11lib/groovy-groovysh-2.5.23.jar
new file mode 100644 (file)
index 0000000..52bebfa
Binary files /dev/null and b/j11lib/groovy-groovysh-2.5.23.jar differ
diff --git a/j11lib/groovy-jaxb-2.5.23.jar b/j11lib/groovy-jaxb-2.5.23.jar
new file mode 100644 (file)
index 0000000..1027777
Binary files /dev/null and b/j11lib/groovy-jaxb-2.5.23.jar differ
diff --git a/j11lib/groovy-jmx-2.5.23.jar b/j11lib/groovy-jmx-2.5.23.jar
new file mode 100644 (file)
index 0000000..5cda1ea
Binary files /dev/null and b/j11lib/groovy-jmx-2.5.23.jar differ
diff --git a/j11lib/groovy-json-2.5.23.jar b/j11lib/groovy-json-2.5.23.jar
new file mode 100644 (file)
index 0000000..adb1a70
Binary files /dev/null and b/j11lib/groovy-json-2.5.23.jar differ
diff --git a/j11lib/groovy-json-direct-2.5.23.jar b/j11lib/groovy-json-direct-2.5.23.jar
new file mode 100644 (file)
index 0000000..c6c3a36
Binary files /dev/null and b/j11lib/groovy-json-direct-2.5.23.jar differ
diff --git a/j11lib/groovy-jsr223-2.5.23.jar b/j11lib/groovy-jsr223-2.5.23.jar
new file mode 100644 (file)
index 0000000..8009b2f
Binary files /dev/null and b/j11lib/groovy-jsr223-2.5.23.jar differ
diff --git a/j11lib/groovy-macro-2.5.23.jar b/j11lib/groovy-macro-2.5.23.jar
new file mode 100644 (file)
index 0000000..ba1db57
Binary files /dev/null and b/j11lib/groovy-macro-2.5.23.jar differ
diff --git a/j11lib/groovy-nio-2.5.23.jar b/j11lib/groovy-nio-2.5.23.jar
new file mode 100644 (file)
index 0000000..cf61461
Binary files /dev/null and b/j11lib/groovy-nio-2.5.23.jar differ
diff --git a/j11lib/groovy-servlet-2.5.23.jar b/j11lib/groovy-servlet-2.5.23.jar
new file mode 100644 (file)
index 0000000..6b47af9
Binary files /dev/null and b/j11lib/groovy-servlet-2.5.23.jar differ
diff --git a/j11lib/groovy-sql-2.5.23.jar b/j11lib/groovy-sql-2.5.23.jar
new file mode 100644 (file)
index 0000000..921bc9a
Binary files /dev/null and b/j11lib/groovy-sql-2.5.23.jar differ
diff --git a/j11lib/groovy-swing-2.5.23.jar b/j11lib/groovy-swing-2.5.23.jar
new file mode 100644 (file)
index 0000000..7ee801d
Binary files /dev/null and b/j11lib/groovy-swing-2.5.23.jar differ
diff --git a/j11lib/groovy-templates-2.5.23.jar b/j11lib/groovy-templates-2.5.23.jar
new file mode 100644 (file)
index 0000000..9da1afc
Binary files /dev/null and b/j11lib/groovy-templates-2.5.23.jar differ
diff --git a/j11lib/groovy-test-2.5.23.jar b/j11lib/groovy-test-2.5.23.jar
new file mode 100644 (file)
index 0000000..fd33542
Binary files /dev/null and b/j11lib/groovy-test-2.5.23.jar differ
diff --git a/j11lib/groovy-test-junit5-2.5.23.jar b/j11lib/groovy-test-junit5-2.5.23.jar
new file mode 100644 (file)
index 0000000..addce25
Binary files /dev/null and b/j11lib/groovy-test-junit5-2.5.23.jar differ
diff --git a/j11lib/groovy-testng-2.5.23.jar b/j11lib/groovy-testng-2.5.23.jar
new file mode 100644 (file)
index 0000000..aaf0cf0
Binary files /dev/null and b/j11lib/groovy-testng-2.5.23.jar differ
diff --git a/j11lib/groovy-xml-2.5.23.jar b/j11lib/groovy-xml-2.5.23.jar
new file mode 100644 (file)
index 0000000..61a9c18
Binary files /dev/null and b/j11lib/groovy-xml-2.5.23.jar differ
diff --git a/j8lib/groovy-2.5.23.jar b/j8lib/groovy-2.5.23.jar
new file mode 100644 (file)
index 0000000..70ac7a0
Binary files /dev/null and b/j8lib/groovy-2.5.23.jar differ
diff --git a/j8lib/groovy-all-2.4.21-indy.jar b/j8lib/groovy-all-2.4.21-indy.jar
deleted file mode 100644 (file)
index 15ee98d..0000000
Binary files a/j8lib/groovy-all-2.4.21-indy.jar and /dev/null differ
diff --git a/j8lib/groovy-ant-2.5.23.jar b/j8lib/groovy-ant-2.5.23.jar
new file mode 100644 (file)
index 0000000..0cd3364
Binary files /dev/null and b/j8lib/groovy-ant-2.5.23.jar differ
diff --git a/j8lib/groovy-bsf-2.5.23.jar b/j8lib/groovy-bsf-2.5.23.jar
new file mode 100644 (file)
index 0000000..9131626
Binary files /dev/null and b/j8lib/groovy-bsf-2.5.23.jar differ
diff --git a/j8lib/groovy-cli-commons-2.5.23.jar b/j8lib/groovy-cli-commons-2.5.23.jar
new file mode 100644 (file)
index 0000000..ebdcff9
Binary files /dev/null and b/j8lib/groovy-cli-commons-2.5.23.jar differ
diff --git a/j8lib/groovy-cli-picocli-2.5.23.jar b/j8lib/groovy-cli-picocli-2.5.23.jar
new file mode 100644 (file)
index 0000000..56a828b
Binary files /dev/null and b/j8lib/groovy-cli-picocli-2.5.23.jar differ
diff --git a/j8lib/groovy-console-2.5.23.jar b/j8lib/groovy-console-2.5.23.jar
new file mode 100644 (file)
index 0000000..99e4cd4
Binary files /dev/null and b/j8lib/groovy-console-2.5.23.jar differ
diff --git a/j8lib/groovy-datetime-2.5.23.jar b/j8lib/groovy-datetime-2.5.23.jar
new file mode 100644 (file)
index 0000000..01137f9
Binary files /dev/null and b/j8lib/groovy-datetime-2.5.23.jar differ
diff --git a/j8lib/groovy-dateutil-2.5.23.jar b/j8lib/groovy-dateutil-2.5.23.jar
new file mode 100644 (file)
index 0000000..1b1f493
Binary files /dev/null and b/j8lib/groovy-dateutil-2.5.23.jar differ
diff --git a/j8lib/groovy-docgenerator-2.5.23.jar b/j8lib/groovy-docgenerator-2.5.23.jar
new file mode 100644 (file)
index 0000000..0a46759
Binary files /dev/null and b/j8lib/groovy-docgenerator-2.5.23.jar differ
diff --git a/j8lib/groovy-groovydoc-2.5.23.jar b/j8lib/groovy-groovydoc-2.5.23.jar
new file mode 100644 (file)
index 0000000..d45f1f5
Binary files /dev/null and b/j8lib/groovy-groovydoc-2.5.23.jar differ
diff --git a/j8lib/groovy-groovysh-2.5.23.jar b/j8lib/groovy-groovysh-2.5.23.jar
new file mode 100644 (file)
index 0000000..52bebfa
Binary files /dev/null and b/j8lib/groovy-groovysh-2.5.23.jar differ
diff --git a/j8lib/groovy-jaxb-2.5.23.jar b/j8lib/groovy-jaxb-2.5.23.jar
new file mode 100644 (file)
index 0000000..1027777
Binary files /dev/null and b/j8lib/groovy-jaxb-2.5.23.jar differ
diff --git a/j8lib/groovy-jmx-2.5.23.jar b/j8lib/groovy-jmx-2.5.23.jar
new file mode 100644 (file)
index 0000000..5cda1ea
Binary files /dev/null and b/j8lib/groovy-jmx-2.5.23.jar differ
diff --git a/j8lib/groovy-json-2.5.23.jar b/j8lib/groovy-json-2.5.23.jar
new file mode 100644 (file)
index 0000000..adb1a70
Binary files /dev/null and b/j8lib/groovy-json-2.5.23.jar differ
diff --git a/j8lib/groovy-json-direct-2.5.23.jar b/j8lib/groovy-json-direct-2.5.23.jar
new file mode 100644 (file)
index 0000000..c6c3a36
Binary files /dev/null and b/j8lib/groovy-json-direct-2.5.23.jar differ
diff --git a/j8lib/groovy-jsr223-2.5.23.jar b/j8lib/groovy-jsr223-2.5.23.jar
new file mode 100644 (file)
index 0000000..8009b2f
Binary files /dev/null and b/j8lib/groovy-jsr223-2.5.23.jar differ
diff --git a/j8lib/groovy-macro-2.5.23.jar b/j8lib/groovy-macro-2.5.23.jar
new file mode 100644 (file)
index 0000000..ba1db57
Binary files /dev/null and b/j8lib/groovy-macro-2.5.23.jar differ
diff --git a/j8lib/groovy-nio-2.5.23.jar b/j8lib/groovy-nio-2.5.23.jar
new file mode 100644 (file)
index 0000000..cf61461
Binary files /dev/null and b/j8lib/groovy-nio-2.5.23.jar differ
diff --git a/j8lib/groovy-servlet-2.5.23.jar b/j8lib/groovy-servlet-2.5.23.jar
new file mode 100644 (file)
index 0000000..6b47af9
Binary files /dev/null and b/j8lib/groovy-servlet-2.5.23.jar differ
diff --git a/j8lib/groovy-sql-2.5.23.jar b/j8lib/groovy-sql-2.5.23.jar
new file mode 100644 (file)
index 0000000..921bc9a
Binary files /dev/null and b/j8lib/groovy-sql-2.5.23.jar differ
diff --git a/j8lib/groovy-swing-2.5.23.jar b/j8lib/groovy-swing-2.5.23.jar
new file mode 100644 (file)
index 0000000..7ee801d
Binary files /dev/null and b/j8lib/groovy-swing-2.5.23.jar differ
diff --git a/j8lib/groovy-templates-2.5.23.jar b/j8lib/groovy-templates-2.5.23.jar
new file mode 100644 (file)
index 0000000..9da1afc
Binary files /dev/null and b/j8lib/groovy-templates-2.5.23.jar differ
diff --git a/j8lib/groovy-test-2.5.23.jar b/j8lib/groovy-test-2.5.23.jar
new file mode 100644 (file)
index 0000000..fd33542
Binary files /dev/null and b/j8lib/groovy-test-2.5.23.jar differ
diff --git a/j8lib/groovy-test-junit5-2.5.23.jar b/j8lib/groovy-test-junit5-2.5.23.jar
new file mode 100644 (file)
index 0000000..addce25
Binary files /dev/null and b/j8lib/groovy-test-junit5-2.5.23.jar differ
diff --git a/j8lib/groovy-testng-2.5.23.jar b/j8lib/groovy-testng-2.5.23.jar
new file mode 100644 (file)
index 0000000..aaf0cf0
Binary files /dev/null and b/j8lib/groovy-testng-2.5.23.jar differ
diff --git a/j8lib/groovy-xml-2.5.23.jar b/j8lib/groovy-xml-2.5.23.jar
new file mode 100644 (file)
index 0000000..61a9c18
Binary files /dev/null and b/j8lib/groovy-xml-2.5.23.jar differ