Home > Net >  How to include application version number in HTML documentation genertated by Spring Rest Docs?
How to include application version number in HTML documentation genertated by Spring Rest Docs?

Time:10-04

I would like to include application version number (version from build.gradle).

I see no way to pass some custom variables to ascidoc and use them in generated documentation. Is it possible?

CodePudding user response:

Passing custom variables from gradle can be done using

 asciidoctor {   
    attributes "build=${build}" 
  }

Then defined attribute may be refered in adoc file as {build}

  • Related