// local build environment properties
def localProps = "${jalviewDir}/local.properties"
if (file(localProps).exists()) {
- def p = new Properties()
- def localPropsFIS = new FileInputStream(localProps)
- p.load(localPropsFIS)
- localPropsFIS.close()
- p.each {
- key, val ->
- def over = getProperty(key) != null
- setProperty(key, val)
- if (over) {
- println("Overriding property '${key}' with local.properties value '${val}'")
- }
+ try {
+ def p = new Properties()
+ def localPropsFIS = new FileInputStream(localProps)
+ p.load(localPropsFIS)
+ localPropsFIS.close()
+ p.each {
+ key, val ->
+ def over = getProperty(key) != null
+ setProperty(key, val)
+ if (over) {
+ println("Overriding property '${key}' with local.properties value '${val}'")
+ }
+ }
+ } catch (Exception e) {
+ System.out.println("Exception reading local.properties")
}
}
}
task jalviewjsCreateJ2sSettings(type: WriteProperties) {
+ group "JalviewJS"
+ description "Create the .j2s file from the j2s.* properties"
+
dependsOn jalviewjsSitePath
+
outputFile ("${jalviewDir}/${jalviewjs_j2s_settings}")
def j2s_props = project.properties.findAll { it.key.startsWith("j2s.") }.sort { it.key }
def siteDirProperty = "j2s.site.directory"
task jalviewjsServer {
group "JalviewJS"
- description "Starts a webserver on localhost to test the website"
+ def filename = "jalviewjsTest.html"
+ description "Starts a webserver on localhost to test the website. See ${filename} to access local site on most recently used port."
dependsOn jalviewjsSitePath
- def htmlFile = "${jalviewDirAbsolutePath}/jalviewjsTest.html"
+ def htmlFile = "${jalviewDirAbsolutePath}/${filename}"
doLast {
SimpleHttpFileServerFactory factory = new SimpleHttpFileServerFactory()
}
-task jalviewjsIDECopyTransferSite(type: Copy) {
+task jalviewjsIDE_CopyTransferSite(type: Copy) {
from "${jalviewDir}/${jalviewjsTransferSiteDir}"
into "${jalviewDir}/${jalviewjsSiteDir}"
}
-task jalviewjsIDEj2s {
- group "JalviewJS in Eclipse"
+task jalviewjsIDE_j2s {
+ group "00 JalviewJS in Eclipse"
description "Creates the .j2s file"
dependsOn jalviewjsCreateJ2sSettings
}
-task jalviewjsIDEBuildSite {
- group "JalviewJS in Eclipse"
- description "Copies the Eclipse transpiled site and unzips supporting zipfiles"
- dependsOn jalviewjsIDECopyTransferSite
+task jalviewjsIDE_AssembleSite {
+ group "00 JalviewJS in Eclipse"
+ description "Assembles the Eclipse transpiled site and unzips supporting zipfiles"
+ dependsOn jalviewjsIDE_CopyTransferSite
dependsOn jalviewjsPrepareSite
}
-task jalviewjsIDESiteClean {
- group "JalviewJS in Eclipse"
+task jalviewjsIDE_SiteClean {
+ group "00 JalviewJS in Eclipse"
description "Deletes the Eclipse transpiled site"
dependsOn cleanJalviewjsSite
}
-task jalviewjsIDEServer {
- group "JalviewJS in Eclipse"
+task jalviewjsIDE_Server {
+ group "00 JalviewJS in Eclipse"
description "Starts a webserver on localhost to test the website"
dependsOn jalviewjsServer
}