forked from docToolchain/ia-artikel-folge-2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
66 lines (53 loc) · 1.38 KB
/
build.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
/**
this part is commented out because it is
the manual way of setting up HTML and PDF
generation.
The next block will show you how to remotely
reference parts of docToolchain.
plugins {
id "org.asciidoctor.convert" version "1.5.9.2"
}
// tag::pdf-plugin[]
dependencies {
asciidoctor 'org.asciidoctor:asciidoctorj-diagram:1.5.11'
asciidoctor 'org.asciidoctor:asciidoctorj-pdf:1.5.0-alpha.15'
}
// end::pdf-plugin[]
import org.asciidoctor.gradle.AsciidoctorTask
// tag::asciidoctor[]
// common settings for asciidoctor
// this is needed for PDF generation with plantUML
tasks.withType(AsciidoctorTask) { docTask ->
sourceDir = file("src/docs/")
sources {
include "Part-2-DocToolchain.adoc"
}
requires = ['asciidoctor-diagram']
}
task generateHTML (
type: AsciidoctorTask,
) {
backends = ['html5']
}
task generatePDF (
type: AsciidoctorTask,
) {
backends = ['pdf']
}
// end::asciidoctor[]
**/
//configure docToolchain to use the main project's config
project('docToolchain') {
if (project.hasProperty('docDir')) {
docDir = '../.'
mainConfigFile = 'Config.groovy'
} else {
println "="*80
println " please initialize the docToolchain submodule"
println " by executing git submodule update -i"
println "="*80
}
}
//for 'clean'-task
apply plugin:'java'
defaultTasks 'generateHTML'