Added pandoc task.
This commit is contained in:
parent
504fdb6bd5
commit
8767f5239c
3 changed files with 475 additions and 6 deletions
25
build.gradle
25
build.gradle
|
@ -2,6 +2,8 @@ apply plugin: 'java'
|
|||
apply plugin: 'idea'
|
||||
apply plugin: 'application'
|
||||
|
||||
import org.apache.tools.ant.taskdefs.condition.Os
|
||||
|
||||
defaultTasks 'deploy'
|
||||
|
||||
version = '1.0'
|
||||
|
@ -45,7 +47,7 @@ jar {
|
|||
def props = new Properties()
|
||||
file(buildProps).withInputStream { stream -> props.load(stream) }
|
||||
version = version + '.' + props.get(buildProp)
|
||||
archiveName = archiveName.toLowerCase()
|
||||
archiveName = archiveName.toLowerCase()
|
||||
manifest.attributes('Main-Class': mainClassName)
|
||||
}
|
||||
|
||||
|
@ -78,7 +80,24 @@ task deploy(dependsOn: ['build', 'copyToDeploy']) {
|
|||
mustRunAfter clean
|
||||
}
|
||||
|
||||
task release(dependsOn: ['deploy', 'wrapper']) {
|
||||
task release(dependsOn: ['deploy', 'pandoc', 'wrapper']) {
|
||||
group = "Publishing"
|
||||
description = "Releases new version."
|
||||
}
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
else {
|
||||
commandLine pandoc_cmd
|
||||
}
|
||||
standardOutput = new ByteArrayOutputStream()
|
||||
ext.output = {
|
||||
return standardOutput.toString()
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue