}
-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
}
#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