Open kkocel opened 5 years ago
Hmm, I did not know that the plugin extension name mattered. I don't really understand how extensions work, but I'll look into it and I'll come with a fix.
A quick workaround is something like:
build.dependsOn task.plantUml
@j-lum thanks for tip
@cosminpolifronie maybe task names could start from verbs - like generatePlantUml
, showPlantUmlIO
etc.
I confirm I had this issue as well and had to use unnatural syntax. By convention and as can be seen in standard plugins, task names start with verbs and reflect what they will do. This might be intended to avoid clashes.
I suggest that plugin by default uses a convention compatible with asciidoctor plugin:
sourceDir | where the asciidoc sources are. Use either sourceDir path, setSourceDir path or sourceDir=path Type: File, but any object convertible with project.file can be passed. Default: src/docs/asciidoc.
Could be src/docs/plantuml. Then all *.puml in the directory are converted to selected image type (unless overridden by other seetings). Unfortunately, verb 'generate' used in PlantUML for rendering is quite confusing. Seeing task like generatePlantUml could make many people think that this generates something for PlanUML rather than renders diagram definitions into images. I'd suggest 'process' or 'render' or something similar.
I would like to run task
plantUml
before my build task.I cannot write:
build dependsOn: plantUml
Since plugin extension has the same name as task.