thanks for your great work on integrating AsciiDoctor with Gradle.
I'm fairly new to the Gradle and AsciiDoctor ecosystems, so please excuse me if this is a trivial question.
I have a repository with multiple .adoc documents which I would like to convert to HTML using Gradle.
I would like to a attributes to the asciidcotor build, that is specific to the input document and computed by a different gradle task that runs before asciidoctor
asciidoctor {
baseDirFollowsSourceFile()
sourceDir("docs")
outputDir("artifacts")
sources {
include("document1.adoc")
include("document2.adoc")
}
attributes(
"build-gradle": file("build.gradle"),
"data-uri": "",
"my-custom-attribute": "<VALUE>" // I'd like to calculate "<VALUE>" in a gradle task and the value should be specific to either "document1.adoc" or "document2.adoc"
)
}
So I guess my question boils down to two aspects:
Can the attribute value be made dynamic and use the output of a previous gradle task?
Can the attribute value be calculated based on the current document being processed?
I'd be greatly appreciate any pointers on how to achieve this.
Hi,
thanks for your great work on integrating AsciiDoctor with Gradle.
I'm fairly new to the Gradle and AsciiDoctor ecosystems, so please excuse me if this is a trivial question.
I have a repository with multiple
.adoc
documents which I would like to convert to HTML using Gradle. I would like to a attributes to the asciidcotor build, that is specific to the input document and computed by a different gradle task that runs beforeasciidoctor
I based my solution on the examples repository.
So I guess my question boils down to two aspects:
I'd be greatly appreciate any pointers on how to achieve this.