Enable specifying which asciidoctor-gradle-plugin backend(s) to run using gradle asciidoc -Pbackends=pdf,xhtml5
.
asciidoctor {
// Other configuration goes here
backends = {
// Enable -Pbackends='pdf,xhtml5' to specify backend(s) to use
def BACKENDS = ['pdf','xhtml5'] // Default backends we use
if(project.hasProperty('backends')){