From 1b59f8e5dc9f80b2590f7d7e17d226d9e0c6b4af Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Sat, 5 Dec 2015 02:24:57 -0800 Subject: [PATCH] Made pandoc task cross-platform. --- HttpStatus.iml | 205 +++++++++++++++++++++++++++++++++++++++++++++ HttpStatus.ipr | 223 +++++++++++++++++++++++++++++++++++++++++++++++++ build.gradle | 17 ++-- 3 files changed, 437 insertions(+), 8 deletions(-) diff --git a/HttpStatus.iml b/HttpStatus.iml index f05d6c7..f678b8e 100644 --- a/HttpStatus.iml +++ b/HttpStatus.iml @@ -126,4 +126,209 @@ + + + + + \ No newline at end of file diff --git a/HttpStatus.ipr b/HttpStatus.ipr index c5332d5..2b6cbd4 100644 --- a/HttpStatus.ipr +++ b/HttpStatus.ipr @@ -269,4 +269,227 @@ + + + + + + + \ No newline at end of file diff --git a/build.gradle b/build.gradle index 3e8e027..1827352 100644 --- a/build.gradle +++ b/build.gradle @@ -87,17 +87,18 @@ task release(dependsOn: ['deploy', 'pandoc', 'wrapper']) { task pandoc(type: Exec) { group = "Documentation" - def pandoc_cmd = 'pandoc --from markdown_github --to html5 -s -o README.html README.md'; - if (Os.isFamily(Os.FAMILY_WINDOWS)) { - commandLine 'cmd', '/c', pandoc_cmd + def pandoc_args = ['--from', 'markdown_github', '--to', 'html5', '-s', '-o', 'README.html', 'README.md'] + if (Os.isFamily(Os.FAMILY_WINDOWS)) + { + commandLine(['cmd', '/c', 'pandoc'] + pandoc_args) } - else { - commandLine pandoc_cmd + else + { + executable '/usr/local/bin/pandoc' + args pandoc_args } standardOutput = new ByteArrayOutputStream() ext.output = { return standardOutput.toString() } -} - - \ No newline at end of file +} \ No newline at end of file