}
+def jalviewjsJalviewTemplateName = "JalviewJS"
+def jalviewjsJalviewCoreName = "_jalview"
task jalviewjsNoTranspileBuildAllCores {
dependsOn jalviewjsSitePath
dependsOn jalviewjsTransferUnzipSwingJs
// _jmol and _jalview cores. Add any other peculiar classlist.txt files here
classlistFiles += [ 'file': file("${jalviewDir}/${jalviewjs_classlist_jmol}"), 'name': "_jvjmol" ]
- classlistFiles += [ 'file': file("${jalviewDir}/${jalviewjs_classlist_jalview}"), 'name': "_jalview" ]
+ classlistFiles += [ 'file': file("${jalviewDir}/${jalviewjs_classlist_jalview}"), 'name': jalviewjsJalviewCoreName ]
def classlists = []
}
+def jalviewjsJalviewCoreHtmlFile
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 = []
+ jalviewjsJalviewCoreHtmlFile = "${jalviewjsJalviewTemplateName}_${jalviewjsJalviewCoreName}.html"
rename { filename ->
outputFiles += "${outputDir}/${filename}"
if (filename.equals(inputFile.getName())) {
- return "${jalviewTemplateName}_${jalviewCoreName}.html"
+ return jalviewjsJalviewCoreHtmlFile
}
return null
}
- filter(ReplaceTokens, beginToken: '_', endToken: '_', tokens: ['MAIN': mainClass, 'CODE': "null", 'NAME': jalviewTemplateName])
- filter(ReplaceTokens, beginToken: '', endToken: '', tokens: ['NONE': "\"${jalviewCoreName}\""])
+ filter(ReplaceTokens, beginToken: '_', endToken: '_', tokens: ['MAIN': '"'+mainClass+'"', 'CODE': "null", 'NAME': jalviewjsJalviewTemplateName])
+ filter(ReplaceTokens, beginToken: '', endToken: '', tokens: ['NONE': jalviewjsJalviewCoreName])
preserve {
include "**"
}
def start = port
def running = false
def url
+ def urlcore
while(port < start+1000 && !running) {
try {
def doc_root = new File("${jalviewDirAbsolutePath}/${jalviewjsSiteDir}")
def jalviewjsServer = factory.start(doc_root, port)
running = true
url = jalviewjsServer.getResourceUrl(jalviewjs_server_resource)
+ urlcore = jalviewjsServer.getResourceUrl(jalviewjsJalviewCoreHtmlFile)
println("SERVER STARTED with document root ${doc_root}.")
println("Go to "+url+" . Run gradle --stop to stop (kills all gradle daemons).")
println("For debug: "+url+"?j2sdebug")
+ println("For core: "+urlcore)
file(htmlFile).text = """
- <p><a href="${url}">Jalview JS Test. <${url}></a></p>
- <p><a href="${url}?j2sdebug">Jalview JS Test with debug. <${url}?j2sdebug<</a></p>
+ <p><a href="${url}">JalviewJS Test. <${url}></a></p>
+ <p><a href="${url}?j2sdebug">JalviewJS Test with debug. <${url}?j2sdebug<</a></p>
+ <p><a href="${urlcore}">${jalviewjsJalviewTemplateName} Core Test. <${urlcore}></a></p>
"""
} catch (Exception e) {