-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathpdfreference.gradle
51 lines (41 loc) · 1.88 KB
/
pdfreference.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/*
NOTE: this script uses local jar in src/main/webapp/WEB-INF/lib to build PDFs
pdfreference.gradle script to construct a PDF document from the asciidoctor text files within the GPars website for the QuickStart Reference book
from a terminal command line, 'cd' into this folder then:
gradlew -b pdfreference.gradle
this runs the defaultTasks below using the gradle wrapper tool gradlew <or> bash ./gradlew <or> gradle tool if installed
*/
apply plugin: 'org.asciidoctor.gradle.asciidoctor'
apply plugin: 'org.asciidoctor.convert'
defaultTasks 'asciidoctor'
// logic to suport asciidoctor html, pdf and diagrams output
buildscript {
repositories {
jcenter()
maven{ url "http://repository.jboss.org/maven2/"}
}
dependencies {
classpath "org.asciidoctor:asciidoctor-gradle-plugin:${asciidoctorVersion}"
classpath fileTree(dir: "$projectDir/src/main/webapp/WEB-INF/lib", include: ['*.jar'])
//classpath("org.asciidoctor:asciidoctorj-pdf:1.5.0-alpha.11") // for PDF's
}
}
repositories {
mavenCentral()
}
// closure for asciidoctor plugin; chg these values to influence asciidoctor task
asciidoctor {
// plugin reads all *.adoc files in this folder and any sub-folder
sourceDir = file('src/docs/asciidoc/quickstart') // choose either core <or> guide <or> quickstart folder and same for outputDir
outputDir = file('src/main/webapp/quickstart') // file("$buildDir/docs")
separateOutputDirs=false // true creates two folders within the outDir path one for html, one for pdf
backends = ['pdf' ] // to create both html and pdf output: backends = ['html5' ,'pdf']
options = [
doctype: 'book',
attributes: [
'source-highlighter': 'coderay',
'toc-title' : 'Table of Contents',
'toc' : 'right'
]
]
}