A gradle plugin that generates UML diagrams based on the PlantUML syntax
Clone or download
Jan Volckaert
Jan Volckaert Fixed github issue #2
prepare for release 0.1.1
Latest commit dabe22f Aug 16, 2014
Failed to load latest commit information.
src/main Fixed github issue #2 Aug 16, 2014
LICENSE initial import Mar 21, 2014
README.md update group in README May 27, 2014
build.gradle Fixed github issue #2 Aug 16, 2014
settings.gradle initial import Mar 21, 2014



Generates UML diagrams using the PlantUML syntax.

At this point in time the diagrams must be defined in a comment block of a java file defined like : http://plantuml.sourceforge.net/javadoc.html

Running 'gradle javadoc' will then go through the java files and generate the UML diagrams ready for import.

When running the plantuml plugin, the plugin will add the following options to the javadoc task

javadoc {
    options.addStringOption('sourcepath', project.plantuml.sourcePath)
    options.docFilesSubDirs = true

This is necessary because by default the javadoc process does not process the doc-files folders.

How To

To use this plugin add a buildscript dependency of the gradle-plantuml-plugin to your build.grade script e.g.:

buildscript {
      dependencies {
          classpath 'be.jlr-home.gradle:plantumlPlugin:0.1.+'

Once the buildscript is added, apply the plantuml plugin: e.g.: apply plugin: 'plantuml'

run gradle javadoc to generate the javadoc


  • !@#$%^ I'm not using the default src/main/java structure and now the doc-files folder is not recognized by javadoc.

    No problem. You can change the javadoc sourcepath, so that the folders are still found and integrated in your javadoc. Just overload plantuml.sourcepath and the magic will happen again. e.g.:

    plantuml {
       sourcePath = 'A/src/main/java' +
               ':B/src/main/java' +

Simple Example

buildscript {
    dependencies {
        classpath 'be.jlr-home.gradle:plantumlPlugin:0.1.+'

apply plugin: 'java'
apply plugin: 'plantuml'
apply plugin: 'groovy'
apply plugin: 'maven'

sourceCompatibility = 1.6
targetCompatibility = 1.6

version = '0.0.1-SNAPSHOT'
group = 'be.jlr-home.gradle'
description = 'Gradle PlantUML example'

dependencies {