Skip to content

Commit

Permalink
add task group (so they are visible with 'gradle tasks')
Browse files Browse the repository at this point in the history
[ci skip]
  • Loading branch information
ar committed Dec 11, 2018
1 parent 8d1a277 commit 4e33619
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions doc/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ task a2x(dependsOn: copySources) {
}

task createPdf(type: DocbookPdf) {
group = 'Toolchain'
setDescription('Generates PDF docbook output.')
extension = 'fo'
dependsOn a2x
Expand All @@ -42,6 +43,7 @@ task createPdf(type: DocbookPdf) {
}

task createHtml(type: DocbookHtml) {
group = 'Toolchain'
setDescription('Generates HTML docbook output.')
dependsOn a2x,copyWebResources
sourceFileName "book.xml"
Expand All @@ -50,14 +52,14 @@ task createHtml(type: DocbookHtml) {
stylesheet "${projectDir}/src/xslt/html.xsl" as File
}

task viewHtml (dependsOn: createHtml, description: 'Open HTML docbook outout in default browser') {
task viewHtml (dependsOn: createHtml, description: 'Open HTML docbook outout in default browser', group: 'Toolchain') {
doLast {
Class.forName("java.awt.Desktop").newInstance().browse(
new File("${buildDir}/docbook/html", 'book.html').toURI())
}
}

task viewPdf (dependsOn: createPdf , description: 'Open PDF docbook outout in default viewer') {
task viewPdf (dependsOn: createPdf , description: 'Open PDF docbook outout in default viewer', group: 'Toolchain') {
doLast {
Class.forName("java.awt.Desktop").newInstance().browse(
new File("${buildDir}/docbook/pdf", this.project.rootProject.name + '.pdf').toURI())
Expand Down

0 comments on commit 4e33619

Please # to comment.