JAL-3210 Added site transfer dir. New net.sf.j2s.core.jar ONLY WORKS WITH ECLIPSE...
authorBen Soares <bsoares@dundee.ac.uk>
Thu, 17 Oct 2019 00:33:38 +0000 (01:33 +0100)
committerBen Soares <bsoares@dundee.ac.uk>
Thu, 17 Oct 2019 00:33:38 +0000 (01:33 +0100)
build.gradle
gradle.properties
utils/jalviewjs/eclipse/dropins/net.sf.j2s.core-3.2.4.jar [deleted file]
utils/jalviewjs/eclipse/dropins/net.sf.j2s.core_3.2.4.jar [new file with mode: 0644]

index 07c744f..314306f 100644 (file)
@@ -1275,6 +1275,7 @@ task jalviewjsSetEclipseWorkspace {
 
 def jalviewjsBuildDir
 def jalviewjsSiteDir
+def jalviewjsTransferSiteDir
 task jalviewjsSitePath {
   if (jalviewjs_site_dir.startsWith("/")) {
     jalviewjsSiteDir = jalviewjs_site_dir
@@ -1283,6 +1284,7 @@ task jalviewjsSitePath {
     jalviewjsBuildDir = "${relativeBuildDir}/jalviewjs"
     jalviewjsSiteDir = jalviewjsBuildDir + "/" + jalviewjs_site_dir
   }
+  jalviewjsTransferSiteDir = jalviewjsBuildDir + "/tmp/site"
 }
 
 
@@ -1358,14 +1360,14 @@ task jalviewjsCreateJ2sSettings(type: WriteProperties) {
     if (prop.startsWith("j2s.") && val != null) {
       if (prop == siteDirProperty) {
         if (!(val.startsWith("/") || val.startsWith("file://") )) {
-          val = jalviewjsSiteDir+"/"+val
+          val = jalviewjsTransferSiteDir+"/"+val
         }
         setSiteDir = true
       }
       property(prop,val)
     }
     if (!setSiteDir) {
-      property(siteDirProperty,"${jalviewjsSiteDir}")
+      property(siteDirProperty,jalviewjsTransferSiteDir)
     }
   }
   outputs.file(outputFile)
@@ -1474,25 +1476,19 @@ task jalviewjsTranspile(type: Exec) {
 
   inputs.dir(sourceDir)
   outputs.dir(eclipse_bin_dir+"/main")
-  outputs.files(
-    fileTree(
-      dir: jalviewjsSiteDir+"/"+jalviewjs_j2s_subdir,
-      includes: [ "**/*.js" ],
-      excludes: [
-        //jalviewjsSiteDir+"/"+jalviewjs_j2s_subdir+"/intervalstore/**",
-        //jalviewjsSiteDir+"/"+jalviewjs_j2s_subdir+"/org/json/**",
-        "intervalstore/**",
-        "org/json/**",
-      ]
-    ).files
-  )
-  outputs.file(jalviewjsSiteDir+jalviewjs_server_resource)
-
-}
-
-jalviewjsUnzipFiles.mustRunAfter jalviewjsTranspile
-jalviewjsTranspile.mustRunAfter jalviewjsCopyResources
-jalviewjsTranspile.mustRunAfter jalviewjsCopySiteResources
+  outputs.dir(jalviewjsTransferSiteDir)
+
+}
+
+task jalviewjsCopyTransferSite(type: Copy) {
+  dependsOn jalviewjsTranspile
+  from jalviewjsTransferSiteDir
+  into jalviewjsSiteDir
+}
+
+jalviewjsUnzipFiles.mustRunAfter jalviewjsCopyTransferSite
+jalviewjsCopyResources.mustRunAfter jalviewjsCopyTransferSite
+jalviewjsCopySiteResources.mustRunAfter jalviewjsCopyTransferSite
 
 task jalviewjsPrepareSite {
   group "JalviewJS"
@@ -1506,8 +1502,8 @@ task jalviewjsPrepareSite {
 task jalviewjsBuildSite {
   group "JalviewJS"
   description "Builds the whole website including transpiled code"
+  dependsOn jalviewjsCopyTransferSite
   dependsOn jalviewjsPrepareSite
-  dependsOn jalviewjsTranspile
 }
 
 task jalviewjsSiteTar(type: Tar) {
@@ -1557,6 +1553,8 @@ task jalviewjsServer {
 }
 
 task jalviewjs {
+  group "JalviewJS"
+  description "Build the site"
   dependsOn jalviewjsBuildSite
 }
 
index 85929f8..168de04 100644 (file)
@@ -142,7 +142,7 @@ eclipse_extra_jdt_prefs_file = .settings/org.eclipse.jdt.core.jalview.prefs
 eclipse_project_name = jalview
 eclipse_bin_dir = bin
 
-jalviewjs_eclipse_root = ~/buildtools/eclipse/eclipse-jee-2019-06
+jalviewjs_eclipse_root = ~/buildtools/eclipse/eclipse-jee-2019-09
 
 jalviewjs_utils_dir = utils/jalviewjs
 jalviewjs_eclipse_dropins_dir = eclipse/dropins
@@ -162,11 +162,12 @@ jalviewjs_server_wait = 30
 jalviewjs_server_resource = /jalview_bin_Jalview.html
 
 j2s.compiler.status = enable
-#j2s.site.directory = null
-#j2s.log.methods.declared = null
-#j2s.log.methods.called = null
+#j2s.site.directory = null ## site defined from buildDir+'/jalviewjs/'+jalviewjs_site_dir
+#j2s.log.methods.declared = j2s_methods_declared.log
+#j2s.log.methods.called = j2s_methods_called.log
 #a semicolon-separated list of package-level file paths to be excluded
 j2s.excluded.paths = test;testng;util
+j2s.include.tests = true
 #j2s.testing = null
 #j2s.compiler.nonqualified.packages = null
 #j2s.compiler.nonqualified.classes = null
diff --git a/utils/jalviewjs/eclipse/dropins/net.sf.j2s.core-3.2.4.jar b/utils/jalviewjs/eclipse/dropins/net.sf.j2s.core-3.2.4.jar
deleted file mode 100644 (file)
index ec67d8c..0000000
Binary files a/utils/jalviewjs/eclipse/dropins/net.sf.j2s.core-3.2.4.jar and /dev/null differ
diff --git a/utils/jalviewjs/eclipse/dropins/net.sf.j2s.core_3.2.4.jar b/utils/jalviewjs/eclipse/dropins/net.sf.j2s.core_3.2.4.jar
new file mode 100644 (file)
index 0000000..a3dff95
Binary files /dev/null and b/utils/jalviewjs/eclipse/dropins/net.sf.j2s.core_3.2.4.jar differ