jalviewjsTransferSiteCoreDir = string("${jalviewjsBuildDir}/tmp/${jalviewjs_site_dir}_core")
jalviewjsJalviewCoreHtmlFile = string("")
jalviewjsJalviewCoreName = string(jalviewjs_core_name)
- jalviewjsDefaultCoreName = string(jalviewjs_default_core)
jalviewjsCoreClasslists = []
jalviewjsJalviewTemplateName = string(jalviewjs_name)
props.store(bytes, null)
def propertiesString = bytes.toString()
propsFile.text = propertiesString
+ print("NEW ")
+ } else {
+ print("EXISTING ")
}
println("ECLIPSE WORKSPACE: "+eclipseWorkspace.getPath())
dependsOn jalviewjsTransferUnzipSwingJs
def j2sDir = "${jalviewDir}/${jalviewjsTransferSiteJsDir}/${jalviewjs_j2s_subdir}"
+ def swingJ2sDir = "${jalviewDir}/${jalviewjsTransferSiteSwingJsDir}/${jalviewjs_j2s_subdir}"
+ def libJ2sDir = "${jalviewDir}/${jalviewjsTransferSiteLibDir}/${jalviewjs_j2s_subdir}"
def jsDir = "${jalviewDir}/${jalviewjsTransferSiteSwingJsDir}/${jalviewjs_js_subdir}"
def outputDir = "${jalviewDir}/${jalviewjsTransferSiteCoreDir}/${jalviewjs_j2s_subdir}/core"
def prefixFile = "${jsDir}/core/coretop2.js"
// _all core
def allClasslistName = "_all"
+ def allJsFiles = fileTree(dir: j2sDir, include: "**/*.js")
+ //allJsFiles += fileTree(dir: libJ2sDir, include: "**/*.js")
+ //allJsFiles += fileTree(dir: swingJ2sDir, include: "**/*.js")
def allClasslist = [
'jsfile': "${outputDir}/core${allClasslistName}.js",
'zjsfile': "${outputDir}/core${allClasslistName}.z.js",
- 'list': fileTree(dir: j2sDir, include: "**/*.js"),
+ 'list': allJsFiles,
'name': allClasslistName
]
jalviewjsCoreClasslists += allClasslist
def start = port
def running = false
def url
+ def jalviewjsServer
while(port < start+1000 && !running) {
try {
def doc_root = new File("${jalviewDirAbsolutePath}/${jalviewjsSiteDir}")
- def jalviewjsServer = factory.start(doc_root, port)
+ jalviewjsServer = factory.start(doc_root, port)
running = true
url = jalviewjsServer.getResourceUrl(jalviewjs_server_resource)
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)
-
- htmlText = """
- <p><a href="${url}">JalviewJS Test. <${url}></a></p>
- <p><a href="${url}?j2sdebug">JalviewJS Test with debug. <${url}?j2sdebug<</a></p>
- """
- jalviewjsCoreClasslists.each { cl ->
- urlcore = jalviewjsServer.getResourceUrl(file(cl.outputfile).getName())
- htmlText += """
- <p><a href="${urlcore}">${jalviewjsJalviewTemplateName} [core ${cl.name}]. <${urlcore}></a></p>
- """
- }
-
- file(htmlFile).text = htmlText
-
+ println("For verbose: "+url+"?j2sverbose")
} catch (Exception e) {
- e.printStackTrace()
port++;
}
}
+ def htmlText = """
+ <p><a href="${url}">JalviewJS Test. <${url}></a></p>
+ <p><a href="${url}?j2sdebug">JalviewJS Test with debug. <${url}?j2sdebug<</a></p>
+ """
+ jalviewjsCoreClasslists.each { cl ->
+ def urlcore = jalviewjsServer.getResourceUrl(file(cl.outputfile).getName())
+ htmlText += """
+ <p><a href="${urlcore}">${jalviewjsJalviewTemplateName} [core ${cl.name}]. <${urlcore}></a></p>
+ """
+ println("For core ${cl.name}: "+urlcore)
+ }
+ file(htmlFile).text = htmlText
}
outputs.file(htmlFile)
jalviewjs_server_port = 9001
jalviewjs_server_wait = 30
jalviewjs_server_resource = /jalview_bin_Jalview.html
-jalviewjs_core_name = _all
+jalviewjs_core_name = _jalview
jalviewjs_name = JalviewJS
#jalviewjs_core_key = core
jalviewjs_core_key = preloadCore
-jalviewjs_default_core = all
j2s.compiler.status = enable
#j2s.site.directory = null ## site defined from buildDir+'/jalviewjs/'+jalviewjs_site_dir