SEC-2785: Reference outputs PDF, Html Multi, & epub

This commit is contained in:
Rob Winch 2014-12-08 13:28:49 -06:00
parent 87a52ffbfd
commit 5f5e7e7265
2 changed files with 17 additions and 4 deletions

View File

@ -10,6 +10,7 @@ buildscript {
classpath("org.gradle.api.plugins:gradle-tomcat-plugin:1.2.3") classpath("org.gradle.api.plugins:gradle-tomcat-plugin:1.2.3")
classpath('me.champeau.gradle:gradle-javadoc-hotfix-plugin:0.1') classpath('me.champeau.gradle:gradle-javadoc-hotfix-plugin:0.1')
classpath('org.asciidoctor:asciidoctor-gradle-plugin:1.5.1') classpath('org.asciidoctor:asciidoctor-gradle-plugin:1.5.1')
classpath("io.spring.gradle:docbook-reference-plugin:0.3.0")
} }
} }

View File

@ -2,12 +2,13 @@
apply plugin: 'base' apply plugin: 'base'
task docs { task docs {
dependsOn 'manual:asciidoctor', 'apidocs', 'guides:asciidoctor' dependsOn 'manual:reference', 'apidocs', 'guides:asciidoctor'
} }
project('manual') { project('manual') {
apply plugin: 'base' apply plugin: 'base'
apply plugin: 'org.asciidoctor.gradle.asciidoctor' apply plugin: 'org.asciidoctor.gradle.asciidoctor'
apply plugin: 'docbook-reference'
ext.expandPlaceholders = "" ext.expandPlaceholders = ""
@ -16,6 +17,7 @@ project('manual') {
} }
asciidoctor { asciidoctor {
backends = ['docbook5']
options = [ options = [
eruby: 'erubis', eruby: 'erubis',
attributes: [ attributes: [
@ -35,11 +37,21 @@ project('manual') {
] ]
} }
reference {
sourceDir = new File(asciidoctor.outputDir , 'docbook5')
pdfFilename = "spring-security-reference.pdf"
epubFilename = "spring-security-reference.epub"
expandPlaceholders = ""
}
afterEvaluate {
tasks.findAll { it.name.startsWith("reference") }.each{ it.dependsOn.add("asciidoctor") }
}
ext.spec = copySpec { ext.spec = copySpec {
into ('reference/htmlsingle') { from (reference) {
from(asciidoctor.outputDir) into 'reference'
exclude 'build', 'Guardfile'
} }
} }
} }