From 1ec15ba9c2c3a61fa93a67c074732d6de65fd2e1 Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Mon, 16 Dec 2019 09:15:46 +0000 Subject: [PATCH] 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 --- gradle/docs.gradle | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/gradle/docs.gradle b/gradle/docs.gradle index 934015c261..591832d681 100644 --- a/gradle/docs.gradle +++ b/gradle/docs.gradle @@ -128,11 +128,7 @@ asciidoctor { } logDocuments = true outputOptions { - backends = ["html5"] - // only ouput PDF documentation for non-SNAPSHOT builds - if (!project.getVersion().toString().contains("BUILD-SNAPSHOT")) { - backends += "pdf" - } + backends = ["html5", "pdf"] } options doctype: 'book', eruby: 'erubis' attributes([