From: Ben Soares Date: Mon, 10 Jun 2019 13:39:20 +0000 (+0100) Subject: JAL-3248 added conversion of building.md to building.html to gradle task. Will happen... X-Git-Tag: Release_2_11_0~7^2~10 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=0ba805a2292f3f36785cf220cfb301fd091eebba;p=jalview.git JAL-3248 added conversion of building.md to building.html to gradle task. Will happen before making jar if pandoc available --- diff --git a/build.gradle b/build.gradle index e143b80..3e5901b 100644 --- a/build.gradle +++ b/build.gradle @@ -455,7 +455,36 @@ task createBuildProperties(type: WriteProperties) { outputs.dir("$classes") } +def buildingHTML = "$jalviewDir/$docDir/building.html" +task deleteBuildingHTML(type: Delete) { + delete buildingHTML +} + +task convertBuildingMD(type: Exec) { + dependsOn deleteBuildingHTML + def buildingMD = "$jalviewDir/$docDir/building.md" + def css = "$jalviewDir/$docDir/github.css" + + def pandoc = pandoc_exec + if (! file(pandoc).exists() && hostname.equals("jv-bamboo")) { + pandoc = System.getProperty("user.home")+"/buildtools/pandoc/bin/pandoc" + } + + if (file(pandoc).exists()) { + commandLine pandoc, '-s', '-o', buildingHTML, '--metadata', 'pagetitle="Building Jalview from Source"', '--toc', '-H', css, buildingMD + } + ignoreExitValue true + + inputs.file(buildingMD) + inputs.file(css) + outputs.file(buildingHTML) +} +clean { + delete buildingHTML +} + task syncDocs(type: Sync) { + dependsOn convertBuildingMD def syncDir = "$classes/$docDir" from fileTree("$jalviewDir/$docDir") into syncDir diff --git a/doc/building.html b/doc/building.html index 615f8ba..7669d30 100644 --- a/doc/building.html +++ b/doc/building.html @@ -4,7 +4,7 @@ - Building Jalview from Source + "Building Jalview from Source"