Skip to content

Commit 1ec15ba

Browse files
wilkinsonasbrannen
authored andcommitted
Always configure PDF backend as task will only run on cache miss
Previously, the Asciidoctor task was not cacheable and generating the PDF documentation was very slow. To improve build times, the PDF documentation was not generated for snapshot builds. The upgrade to 2.4.0 of the Asciidoctor Gradle pluging means that the Asciidoctor task is now cacheable. As such, its tasks will only run when the documentation has changed. This should allow PDF documentation to be published for every build without slowing things down too much and the cost of generating the documentation will only be incurred when there is a change to the documentation. See gh-24216
1 parent 2ac5744 commit 1ec15ba

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

gradle/docs.gradle

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -128,11 +128,7 @@ asciidoctor {
128128
}
129129
logDocuments = true
130130
outputOptions {
131-
backends = ["html5"]
132-
// only ouput PDF documentation for non-SNAPSHOT builds
133-
if (!project.getVersion().toString().contains("BUILD-SNAPSHOT")) {
134-
backends += "pdf"
135-
}
131+
backends = ["html5", "pdf"]
136132
}
137133
options doctype: 'book', eruby: 'erubis'
138134
attributes([

0 commit comments

Comments
 (0)