diff --git a/build.gradle b/build.gradle index c1533a2b69..e2cbd19359 100644 --- a/build.gradle +++ b/build.gradle @@ -4,6 +4,7 @@ plugins { id 'org.jetbrains.kotlin.jvm' version '1.4.10' apply false id 'org.jetbrains.dokka' version '0.10.1' apply false id 'org.asciidoctor.jvm.convert' version '2.4.0' + id 'org.asciidoctor.jvm.pdf' version '2.4.0' id 'de.undercouch.download' version '4.1.1' id "io.freefair.aspectj" version '5.1.1' apply false id "com.github.ben-manes.versions" version '0.28.0' diff --git a/gradle/docs.gradle b/gradle/docs.gradle index ae69842013..24d994004f 100644 --- a/gradle/docs.gradle +++ b/gradle/docs.gradle @@ -130,29 +130,6 @@ asciidoctorj { } } fatalWarnings ".*" -} - -/** - * Produce the Spring Framework Reference documentation - * from "src/docs/asciidoc" into "build/asciidoc/html5" - */ -asciidoctor { - baseDirFollowsSourceDir() - configurations 'asciidoctorExt' - sources { - include '*.adoc' - } - outputDir "$buildDir/docs/ref-docs/" - resources { - from(sourceDir) { - include 'images/*.png', 'css/**', 'js/**' - } - from extractDocResources - } - logDocuments = true - outputOptions { - backends = ["html5", "pdf"] - } options doctype: 'book', eruby: 'erubis' attributes([ icons: 'font', @@ -171,6 +148,41 @@ asciidoctor { ]) } +/** + * Generate the Spring Framework Reference documentation from "src/docs/asciidoc" + * in "build/docs/ref-docs/html5". + */ +asciidoctor { + dependsOn asciidoctorPdf + baseDirFollowsSourceDir() + configurations 'asciidoctorExt' + sources { + include '*.adoc' + } + outputDir "$buildDir/docs/ref-docs/html5" + logDocuments = true + resources { + from(sourceDir) { + include 'images/*.png', 'css/**', 'js/**' + } + from extractDocResources + } +} + +/** + * Generate the Spring Framework Reference documentation from "src/docs/asciidoc" + * in "build/docs/ref-docs/pdf". + */ +asciidoctorPdf { + baseDirFollowsSourceDir() + configurations 'asciidoctorExt' + sources { + include '*.adoc' + } + outputDir "$buildDir/docs/ref-docs/pdf" + logDocuments = true +} + /** * Zip all docs (API and reference) into a single archive */