From: Ben Soares Date: Fri, 8 Nov 2019 17:18:05 +0000 (+0000) Subject: JAL-3210 PublishCoreTemplate task X-Git-Tag: Release_2_11_4_0~45^2~18^2~70 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=68afc8e1b0a462cc4e876e37f23a66adb20518d1;p=jalview.git JAL-3210 PublishCoreTemplate task --- diff --git a/build.gradle b/build.gradle index fb24235..bbba335 100644 --- a/build.gradle +++ b/build.gradle @@ -2159,6 +2159,32 @@ task jalviewjsIDE_BuildAllCores { } -task jalviewjsPublishCoreTemplate { +task jalviewjsPublishCoreTemplate(type: Sync) { + dependsOn jalviewjsSitePath dependsOn jalviewjsBuildAllCores + +// clean this up + def inputFile = file("${jalviewDir}/${j2s_template_html}") + def outputDir = "${jalviewDir}/${jalviewjsTransferSiteCoreDir}" + +// clean this up + def jalviewTemplateName = "JalviewJS" + def jalviewCoreName = "_jalview" + + from inputFile + into outputDir + def outputFiles = [] + rename { filename -> + outputFiles += "${outputDir}/${filename}" + if (filename.equals(inputFile.getName())) { + return "${jalviewTemplateName}_${jalviewCoreName}.html" + } + return null + } + filter(ReplaceTokens, beginToken: '', endToken: '', tokens: ['NONE': jalviewCoreName]) + preserve { + include "**" + } + outputs.files outputFiles + inputs.files inputFile } diff --git a/gradle.properties b/gradle.properties index 03ec720..710e942 100644 --- a/gradle.properties +++ b/gradle.properties @@ -190,6 +190,7 @@ j2s.excluded.paths = test;testng;util #a semicolon-separated list of package (foo.) or class (foo.bar) replacements to be made j2s.class.replacements = org.apache.log4j.->jalview.javascript.log4j. j2s.template.html = utils/jalviewjs/template.html +j2s_template_html = utils/jalviewjs/template.html #output file name for logging methods declared - delete the file to regenerate a listing #j2s.prop.j2s.log.methods.declared=swingjs/methodsDeclared_csv #output file name for logging methods called - delete the file to regenerate a listing