I don't know any Ruby but I do like asciidoctor
(and the gradle plugin). Is there a simple way to get the plugin to generate plantuml diagrams?
I looked at the basic asciidoctor-diagrams functionality which seems specific to using the native/ruby asciidoctor extension (which I don't have and would rather not install since I like using the gradle plugin).
The nicely done asciidoctor-gradle-plugin documentation page shows that it accepts a requires
option for Ruby modules but having no grounding in Ruby whatsoever, I'm not sure if that's what I need or not.
I tried the path of least resistant, i.e.:
asciidoctor {
logDocuments = true
separateOutputDirs = false
sourceDir = file("src")
outputDir = file("$buildDir/html")
backends = [ 'html5' ]
requires "asciidoctor-diagram"
}
Against my basic plantuml test:
.The PlantUML block extension class
[plantuml, sample-plantuml-diagram, alt="Class diagram", width=135, height=118]
----
class BlockProcessor
class PlantUmlBlock
BlockProcessor <|-- PlantUmlBlock
----
But got:
* What went wrong:
Execution failed for task ':asciidoctor'.
> (LoadError) no such file to load -- asciidoctor-diagram
during the configuration phase.
How can I configure asciidoctor-gradle-plugin
to handle plantuml?
mrhaki to the rescue. I don't want to totally rip-off his post, but in case that link ever goes bad, there are numerous other dependencies that need to be met in the gradle file the first that I didn't have was com.github.jruby-gradle:jruby-gradle-plugin:0.1.5
then he applies two plugins including com.github.jruby-gradle.base
and has a dependency on ruby gems (rubygems:asciidoctor-diagram:1.2.0
). I think his blog site is pretty reliable so I won't go into the details.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With