diff --git a/docs/build.gradle b/docs/build.gradle index 0da6f2ecca..055c3c98a5 100644 --- a/docs/build.gradle +++ b/docs/build.gradle @@ -21,7 +21,7 @@ def internalPackagePrefixes(sourceDirs) { ext { // TODO: Add '../client/jfx/src/main/kotlin' and '../client/mock/src/main/kotlin' if we decide to make them into public API dokkaSourceDirs = files('../core/src/main/kotlin', '../client/rpc/src/main/kotlin', '../finance/src/main/kotlin', '../client/jackson/src/main/kotlin', - '../testing/test-utils/src/main/kotlin', '../testing/node-driver/src/main/kotlin') + '../testing/test-utils/src/main/kotlin', '../testing/node-driver/src/main/kotlin') internalPackagePrefixes = internalPackagePrefixes(dokkaSourceDirs) } @@ -62,10 +62,16 @@ task dokkaJavadoc(type: org.jetbrains.dokka.gradle.DokkaTask) { task buildDocs(dependsOn: ['apidocs', 'makeDocs']) task apidocs(dependsOn: ['dokka', 'dokkaJavadoc']) -task makeDocs(type: Exec, dependsOn: ['installDocsiteRequirements']) { - // TODO: Non-msys Windows script - commandLine 'cmd', '/c', 'bash make-docsite.sh' // Windows - commandLine 'bash', './make-docsite.sh' // Linux +task makeDocs(dependsOn: ['installDocsiteRequirements', 'makeHtmlDocs', 'makePdfDocs']) + +task makeHtmlDocs(type: Exec, dependsOn: ['installDocsiteRequirements']) { + commandLine 'cmd', '/c', 'bash make-docsite-html.sh' // Windows + commandLine 'bash', './make-docsite-html.sh' // Linux +} + +task makePdfDocs(type: Exec, dependsOn: ['installDocsiteRequirements']) { + commandLine 'cmd', '/c', 'bash make-docsite-pdf.sh' // Windows + commandLine 'bash', './make-docsite-pdf.sh' // Linux } task installDocsiteRequirements(type: Exec) { diff --git a/docs/make-docsite-html.sh b/docs/make-docsite-html.sh new file mode 100755 index 0000000000..1a6d754b60 --- /dev/null +++ b/docs/make-docsite-html.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash +# The purpose of this file is to make the docsite in a python virtualenv +# You can call it manually if running make manually, otherwise gradle will run it for you + +# Activate the virtualenv +if [ -d "virtualenv/bin" ] +then + # it's a Unix system + source virtualenv/bin/activate +else + source virtualenv/Scripts/activate +fi + + +echo "Generating HTML pages ..." +make html + diff --git a/docs/make-docsite.sh b/docs/make-docsite-pdf.sh similarity index 89% rename from docs/make-docsite.sh rename to docs/make-docsite-pdf.sh index 3f16b7f8b8..d204d5f329 100755 --- a/docs/make-docsite.sh +++ b/docs/make-docsite-pdf.sh @@ -14,8 +14,5 @@ fi echo "Generating PDF document ..." make latexpdf -echo "Generating HTML pages ..." -make html - echo "Moving PDF file from $(eval echo $PWD/build/pdf/corda-developer-site.pdf) to $(eval echo $PWD/build/html/_static/corda-developer-site.pdf)" mv $PWD/build/latex/corda-developer-site.pdf $PWD/build/html/_static/corda-developer-site.pdf \ No newline at end of file diff --git a/node/dist/build.gradle b/node/dist/build.gradle index f27eb26069..1ae0d8f390 100644 --- a/node/dist/build.gradle +++ b/node/dist/build.gradle @@ -133,7 +133,7 @@ if (Os.isFamily(Os.FAMILY_UNIX)) { } } - task buildNode(type: Copy, dependsOn: [buildLauncher, project(':docs').tasks['makeDocs'], project(':node').tasks['jar']]) { + task buildNode(type: Copy, dependsOn: [buildLauncher, project(':docs').tasks['makeHtmlDocs'], project(':node').tasks['jar']]) { description 'Build stand-alone Corda Node distribution' def dir = file("$outputDir/corda-enterprise")