Repository navigation
Expand file tree
/
Copy pathpdfstructure.gradle
More file actions
56 lines (43 loc) · 1.89 KB
/
Copy pathpdfstructure.gradle
File metadata and controls
56 lines (43 loc) · 1.89 KB
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
52
53
54
55
56
/*
NOTE: this script uses local jar in src/main/webapp/WEB-INF/lib to build PDFs
pdfstructure.gradle script to construct a PDF document about the project folder structure of this GPars Website (not core GPars)
from a terminal command line, 'cd' into this folder then:
gradlew -b pdfstructure.gradle
this runs the defaultTasks below using the gradle wrapper tool gradlew <or> bash ./gradlew <or> gradle tool if installed
see: http://stackoverflow.com/questions/20700053/how-to-add-local-jar-file-dependency-to-build-gradle-file
for more info on using local jar in buildscript
*/
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/WebsiteStructure')
outputDir = file('src/main/webapp/WebsiteStructure')
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'
]
]
}