From: Ben Soares Date: Fri, 10 Nov 2023 21:26:06 +0000 (+0000) Subject: JAL-4059 fix not merging html files to the final site from libs X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=de2a523501376d27e85d08cdc38a47de3a082a39;p=jalview.git JAL-4059 fix not merging html files to the final site from libs --- diff --git a/build.gradle b/build.gradle index 751e6c3..fb1a83b 100644 --- a/build.gradle +++ b/build.gradle @@ -3401,8 +3401,6 @@ task jalviewjsTransferUnzipSwingJs { copy { from zipTree(file_zip) into "${jalviewDir}/${jalviewjsTransferSiteSwingJsDir}" - exclude "**.html" - exclude "**.htm" } } @@ -3419,8 +3417,6 @@ task jalviewjsTransferUnzipLib { copy { from zipTree(file_zip) into "${jalviewDir}/${jalviewjsTransferSiteLibDir}" - exclude "**.html" - exclude "**.htm" // The following replace() is needed due to a mismatch in Jmol calls to // colorPtToFFRGB$javajs_util_T3d when only colorPtToFFRGB$javajs_util_T3 is defined @@ -3696,7 +3692,7 @@ DEBUG: ${eclipseDebug} } -task jalviewjsTranserSiteMergeDirs (type: Sync) { +task jalviewjsTranserSiteMergeLibDirs (type: Sync) { dependsOn jalviewjsTransferUnzipAllLibs dependsOn jalviewjsTransferUnzipSwingJs dependsOn jalviewjsTranspile @@ -3704,8 +3700,35 @@ task jalviewjsTranserSiteMergeDirs (type: Sync) { def inputFiles = fileTree(dir: "${jalviewDir}/${jalviewjsTransferSiteLibDir}") // merge swingjs lib last inputFiles += fileTree(dir: "${jalviewDir}/${jalviewjsTransferSiteSwingJsDir}") + + def outputDir = "${jalviewDir}/${jalviewjsTransferSiteMergeDir}" + + from inputFiles + into outputDir + def outputFiles = [] + rename { filename -> + outputFiles += "${outputDir}/${filename}" + null + } + + exclude "**/*.html" + exclude "**/*.htm" + + // should this be exclude really ? No, swingjs dir should be transferred last (and overwrite) + duplicatesStrategy "INCLUDE" + + outputs.files outputFiles + inputs.files inputFiles +} + + +task jalviewjsTranserSiteMergeSwingDir (type: Sync) { + dependsOn jalviewjsTransferUnzipAllLibs + dependsOn jalviewjsTransferUnzipSwingJs + dependsOn jalviewjsTranspile + // merge jalview files very last - inputFiles += fileTree(dir: "${jalviewDir}/${jalviewjsTransferSiteJsDir}") + def inputFiles = fileTree(dir: "${jalviewDir}/${jalviewjsTransferSiteJsDir}") def outputDir = "${jalviewDir}/${jalviewjsTransferSiteMergeDir}" @@ -3720,7 +3743,7 @@ task jalviewjsTranserSiteMergeDirs (type: Sync) { include "**" } - // should this be exclude really ? No, swingjs dir should be transferred last (and overwrite) + // should this be exclude really ? No, jalview dir should be transferred last (and overwrite) duplicatesStrategy "INCLUDE" outputs.files outputFiles @@ -3728,6 +3751,12 @@ task jalviewjsTranserSiteMergeDirs (type: Sync) { } +task jalviewjsTranserSiteMergeDirs { + dependsOn jalviewjsTranserSiteMergeLibDirs + dependsOn jalviewjsTranserSiteMergeSwingDir +} + + def jalviewjsCallCore(String name, FileCollection list, String prefixFile, String suffixFile, String jsfile, String zjsfile, File logOutFile, Boolean logOutConsole) { def stdout = new ByteArrayOutputStream()