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
This commit is contained in:
parent
2ac5744323
commit
1ec15ba9c2
|
@ -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([
|
||||
|
|
Loading…
Reference in New Issue