Visualizing code of your application. It generates full diagram of your classes in .dot(graphviz) file.
Plugin is based on work - Classgraph You can open the generated dot file in a vector editor. You can convert then the model into The Standard for exchange of architecture models from The Open Group
Plugin uses all jars in runtimeClasspath configuration and also main source set build folder (there for the task depends on 'build' task) Scans both project and subprojects
Plugin avialable at gradle plugin portal
Project for testing athttps://github.com/wilmerkrisp/archidoc-test[gitlab]
configure plugin in build.gradle, select whrere to put file and your programm packages for analysis.
plugins {
id 'life.expert.archidoc' version '1.0.10'
}
project.tasks.getByName("archidoc").dependsOn 'build'
archidoc { file "$buildDir/architecture/classdiagram.dot" packages = ['com.my'] enableAllInfo() }
multiProject() //if you want analyze also gradle subprojects, please build all subprojects because the task doesnot depend on subprojects build-tasks
Also Classgraph options avialable:
verbose() // print all log messages
enableAllInfo() // all information about classes
enableFieldInfo()
enableMethodInfo()
ignoreFieldVisibility()
ignoreMethodVisibility()
enableClassInfo()
enableAnnotationInfo()
ignoreClassVisibility()
enableInterClassDependencies()
enableExternalClasses()
project.tasks.getByName("archidoc").dependsOn 'build',**':subproject:build'**
archidoc {
file "$buildDir/architecture/classdiagram.dot"
packages = ['com.my', 'org.your']
**multiProject()**
enableAllInfo()
verbose()
}
plugins {
id "life.expert.archidoc" version "1.0.10"
id "com.simonharrer.graphviz" version "0.0.1" // thanks to https://github.com/simonharrer/gradle-graphviz-plugin
}
archidoc {
//Sorry. For "graphviz plugin" No configuration possible.
//It just converts your **src/main/graphviz/**.dot to build/graphviz/.png.
file "${project.projectDir}/src/main/graphviz/classdiagram.dot"
packages = ['org' ]
enableAllInfo()
}
graphviz.dependsOn(archidoc)