A simple Gradle plugin that generates PlantUML class diagrams from Java source files. It uses QDox to parse the source files.
This plugin is not ready for production.
The buildClassDiagram
task reads all source files and generates a PlantUML diagram.
This plugin can be configured using the classDiagram
extension
in your build.gradle.
classDiagram {
sourceSet = sourceSets.main
outputFile = project.file('build/diagrams/main.plantuml')
visibility = "package private"
associationFieldVisibility = "private"
associationMethodVisibility = null
colors = [
'some.package.name': '#d8d4fc',
'some.other.package.name': '#d4fcdc'
]
before = "skinparam shadowing false"
}
The source files to include in the diagram.
The output file for the PlantUML diagram.
The minimum visibility for classes, methods and fields to be included in the diagram.
Allowed values: "public"
, "protected"
, "package private"
, "private"
Default value: "public"
The minimum visibility for fields to be included in the creation of associations.
To hide all field associations set this property to null
.
Allowed values: null
, "public"
, "protected"
, "package private"
, "private"
Default value: "private"
The minimum visibility for methods to be included in the creation of associations.
To hide all method associations set this property to null
.
Allowed values: null
, "public"
, "protected"
, "package private"
, "private"
Default value: "public"
A map of colors for specific packages.
Default value: []
A string to include in the generated diagram file before all generated definitions.
Default value: ""