Skip to content

Commit 5f5e7e7

Browse files
author
Rob Winch
committed
SEC-2785: Reference outputs PDF, Html Multi, & epub
1 parent 87a52ff commit 5f5e7e7

File tree

2 files changed

+17
-4
lines changed

2 files changed

+17
-4
lines changed

build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ buildscript {
1010
classpath("org.gradle.api.plugins:gradle-tomcat-plugin:1.2.3")
1111
classpath('me.champeau.gradle:gradle-javadoc-hotfix-plugin:0.1')
1212
classpath('org.asciidoctor:asciidoctor-gradle-plugin:1.5.1')
13+
classpath("io.spring.gradle:docbook-reference-plugin:0.3.0")
1314
}
1415
}
1516

docs/docs.gradle

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@
22
apply plugin: 'base'
33

44
task docs {
5-
dependsOn 'manual:asciidoctor', 'apidocs', 'guides:asciidoctor'
5+
dependsOn 'manual:reference', 'apidocs', 'guides:asciidoctor'
66
}
77

88
project('manual') {
99
apply plugin: 'base'
1010
apply plugin: 'org.asciidoctor.gradle.asciidoctor'
11+
apply plugin: 'docbook-reference'
1112

1213
ext.expandPlaceholders = ""
1314

@@ -16,6 +17,7 @@ project('manual') {
1617
}
1718

1819
asciidoctor {
20+
backends = ['docbook5']
1921
options = [
2022
eruby: 'erubis',
2123
attributes: [
@@ -35,11 +37,21 @@ project('manual') {
3537
]
3638
}
3739

40+
reference {
41+
sourceDir = new File(asciidoctor.outputDir , 'docbook5')
42+
pdfFilename = "spring-security-reference.pdf"
43+
epubFilename = "spring-security-reference.epub"
44+
expandPlaceholders = ""
45+
}
46+
47+
afterEvaluate {
48+
tasks.findAll { it.name.startsWith("reference") }.each{ it.dependsOn.add("asciidoctor") }
49+
}
50+
3851

3952
ext.spec = copySpec {
40-
into ('reference/htmlsingle') {
41-
from(asciidoctor.outputDir)
42-
exclude 'build', 'Guardfile'
53+
from (reference) {
54+
into 'reference'
4355
}
4456
}
4557
}

0 commit comments

Comments
 (0)