From: soares Date: Tue, 12 Nov 2019 20:10:08 +0000 (+0000) Subject: JAL-3210 multiple core templates. X-Git-Tag: Release_2_11_4_0~45^2~18^2~58 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=0ddf418d7540e715e6f0d112e2375fb1d7f1f294;p=jalview.git JAL-3210 multiple core templates. --- diff --git a/build.gradle b/build.gradle index fc4d9ca..4080744 100644 --- a/build.gradle +++ b/build.gradle @@ -293,7 +293,6 @@ ext { 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) @@ -1439,6 +1438,9 @@ task jalviewjsSetEclipseWorkspace { props.store(bytes, null) def propertiesString = bytes.toString() propsFile.text = propertiesString + print("NEW ") + } else { + print("EXISTING ") } println("ECLIPSE WORKSPACE: "+eclipseWorkspace.getPath()) @@ -1893,6 +1895,8 @@ task jalviewjsBuildAllCores { 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" @@ -1969,10 +1973,13 @@ task jalviewjsBuildAllCores { // _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 @@ -2155,36 +2162,34 @@ task jalviewjsServer { 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 = """ -

JalviewJS Test. <${url}>

-

JalviewJS Test with debug. <${url}?j2sdebug<

- """ - jalviewjsCoreClasslists.each { cl -> - urlcore = jalviewjsServer.getResourceUrl(file(cl.outputfile).getName()) - htmlText += """ -

${jalviewjsJalviewTemplateName} [core ${cl.name}]. <${urlcore}>

- """ - } - - file(htmlFile).text = htmlText - + println("For verbose: "+url+"?j2sverbose") } catch (Exception e) { - e.printStackTrace() port++; } } + def htmlText = """ +

JalviewJS Test. <${url}>

+

JalviewJS Test with debug. <${url}?j2sdebug<

+ """ + jalviewjsCoreClasslists.each { cl -> + def urlcore = jalviewjsServer.getResourceUrl(file(cl.outputfile).getName()) + htmlText += """ +

${jalviewjsJalviewTemplateName} [core ${cl.name}]. <${urlcore}>

+ """ + println("For core ${cl.name}: "+urlcore) + } + file(htmlFile).text = htmlText } outputs.file(htmlFile) diff --git a/gradle.properties b/gradle.properties index aaf403d..d268369 100644 --- a/gradle.properties +++ b/gradle.properties @@ -173,11 +173,10 @@ jalviewjs_eclipse_build_arg = cleanBuild 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