How include::sample Work

In the multi-language sample declaration,we can write the code:

.Customizing what Gradle logs


how is it parsed into html?

this is the official explanation:

include::sample: invokes the SampleIncludeProcessor asciidoctor extension, with a dir relative to src/snippets/, and a list of files separated by ; (only 1 in this example), each with optional tags=... (like Asciidoctor’s tags mechanism). We write this once for each DSL dialect. This notes to our front-end code to group these 2 samples and show them with selector tabs.

but i didn’t find SampleIncludeProcessor in the project and dependency library。

What is his parsing mechanism?

That’s some closed source thing they use to generate the docs.
In Make AsciidoctorTask cacheable again by blindpirate · Pull Request #8148 · gradle/gradle · GitHub you can find a link to and also the mention that it is a private repo.

1 Like