From 444bb6a162894f92ecfffcb7e962c8751293ec7a Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Tue, 2 Jul 2019 12:01:57 +0100 Subject: [PATCH] JAL-3337 publish help as html pages with GA tracker (ant task rescued from old build system) --- build.gradle | 13 ++++++++++ utils/publishHelp.xml | 64 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 77 insertions(+) create mode 100644 utils/publishHelp.xml diff --git a/build.gradle b/build.gradle index 995afaf..9c57524 100644 --- a/build.gradle +++ b/build.gradle @@ -747,6 +747,12 @@ task linkCheck(type: JavaExec) { outputs.file(helplinkscheckertouchfile) } +// import the pubhtmlhelp target +ant.properties.basedir = "$jalviewDir" +ant.properties.helpBuildDir = jalviewDirAbsolutePath+"/$classes/$helpDir" +ant.importBuild "$utilsDir/publishHelp.xml" + + task cleanPackageDir(type: Delete) { delete fileTree("$jalviewDir/$packageDir").include("*.jar") } @@ -1204,3 +1210,10 @@ task sourceDist (type: Tar) { } +task helppages { + dependsOn copyHelp + dependsOn pubhtmlhelp + + inputs.dir("$classes/$helpDir") + outputs.file("build/distribution/help/helpTOC.html") +} \ No newline at end of file diff --git a/utils/publishHelp.xml b/utils/publishHelp.xml new file mode 100644 index 0000000..17ef9e2 --- /dev/null +++ b/utils/publishHelp.xml @@ -0,0 +1,64 @@ + + + + + + + + + + + + + + + + + + + + ]]> + + var gaJsHost = (("https:" == document.location.protocol) ? + "https://ssl." : "http://www."); + document.write(unescape("%3Cscript src=\'" + gaJsHost + + "google-analytics.com/ga.js\' type=\'text/javascript\'%3E%3C/script%3E")); + + + +]]> + + + +Jalview Documentation + + + + +<body> +This page requires a browser that supports frames. +<script type="text/javascript"> + var gaJsHost = (("https:" == document.location.protocol) ? + "https://ssl." : "http://www."); + document.write(unescape("%3Cscript src=\'" + gaJsHost + + "google-analytics.com/ga.js\' type=\'text/javascript\'%3E%3C/script%3E")); +</script> +<script type="text/javascript"> +try{ + var pageTracker = _gat._getTracker("'UA-9060947-1'"); + pageTracker._trackPageview(); +} catch(err) {} +</script></body> +<noframes></frameset> +</html> +]]></echo> + + </target> +</project> -- 1.7.10.2