From: Ben Soares Date: Wed, 2 Oct 2019 12:43:13 +0000 (+0100) Subject: JAL-3210 Full incrementality with jalviewTranspile, and corrected thrown Exception X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=0634dccaddd950c7d6acc7a3da631317efee2a48;p=jalview.git JAL-3210 Full incrementality with jalviewTranspile, and corrected thrown Exception --- diff --git a/build.gradle b/build.gradle index 0a3ff41..2392175 100644 --- a/build.gradle +++ b/build.gradle @@ -301,7 +301,7 @@ equinoxLaunch { } } -task testIde(type: ) { +task testIde(type: Exec) { } task ideCopyDropins (type: Copy) { @@ -527,15 +527,25 @@ task jalviewjsTranspile(type: Exec) { doLast { if (stdout.toString().contains("Error processing ")) { // j2s did not complete transpile - throw new TaskExecutionException("Error during transpilation:\n${stderr}\n") + throw new GradleException("Error during transpilation:\n${stderr}\nSee eclipse transpile log files '${jalviewjsBuildDir}/${jalviewjs_j2s_stdout}' and '${jalviewjsBuildDir}/${jalviewjs_j2s_stderr}'\n") } } inputs.dir(sourceDir) outputs.dir(eclipse_bin_dir+"/main") - outputs.dir(jalviewjsSiteDir+"/"+jalviewjs_j2s_subdir) + 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) - outputs.upToDateWhen { file(jalviewjsSiteDir+jalviewjs_server_resource).exists() } } @@ -544,7 +554,9 @@ task jalviewjsTranspile(type: Exec) { - +jalviewjsUnzipFiles.mustRunAfter jalviewjsTranspile +jalviewjsTranspile.mustRunAfter jalviewjsCopyResources +jalviewjsTranspile.mustRunAfter jalviewjsCopySiteResources task jalviewjsBuildSite { dependsOn jalviewjsSitePath diff --git a/gradle.properties b/gradle.properties index 061efb6..bb15697 100644 --- a/gradle.properties +++ b/gradle.properties @@ -50,8 +50,8 @@ jalviewjs_j2s_subdir = swingjs/j2s jalviewjs_j2s_settings_file = dot_j2s jalviewjs_j2s_settings = .j2s jalviewjs_eclipse_workspace = ../tmp/eclipse-workspace -#jalviewjs_eclipseBuildArg = build -jalviewjs_eclipseBuildArg = cleanBuild +jalviewjs_eclipseBuildArg = build +#jalviewjs_eclipseBuildArg = cleanBuild jalviewjs_server_port = 9001 jalviewjs_server_wait = 30 jalviewjs_server_resource = /jalview_bin_Jalview.html