Tools to analyze package-level structure and visualize it
Download the latest jar file from the release
This tool relies on graphviz. Please install graphviz first.
d
: Enter the directory path.p
: Enter the package path.o
: (optional) Enter the destination file path.failure-on-cycles
: (optional) Enter whether to fail if a cycle occurs between modules.
java -jar heo-cli-0.0.2.jar -d /Users/heowc/Projects/heo -p dev.heowc.heo
$ java -jar heo-cli-0.0.2.jar -d /Users/heowc/Projects/heo-core -p dev.heowc.heo.core
__ __ _______ _______
| | | || || |
| |_| || ___|| _ |
| || |___ | | | |
| || ___|| |_| |
| _ || |___ | |
|__| |__||_______||_______|
2024-05-01T17:23:52.031+09:00 INFO 72099 --- [ main] c.h.h.c.l.a.ModuleLoaderService : Loading dev.heowc.heo from ./
2024-05-01T17:23:52.044+09:00 INFO 72099 --- [ main] c.h.h.c.a.a.DependencyAnalysisService : Analysing project dependencies for modules. size=0
2024-05-01T17:23:52.445+09:00 INFO 72099 --- [ main] c.h.h.c.v.ReportVisualizationService : Report file created (file:///Users/heowc/Projects/heo/result-1714551832030.png)
A gradle plugin is provided for easier use.
https://plugins.gradle.org/plugin/dev.heowc.heo
plugins {
id "dev.heowc.heo" version "{LATEST_VERSION}"
}
heo {
directoryPath = "${rootDir}/heo-core" // The default is to use the root path.
prefixPackage = "dev.heowc.heo.core" // The default is group.
// destination // By default, the `reports/heo/index.png` image file is created under the build path.
// failure-on-cycles // The default option is disabled,
// and if enabled the task will fail if a cycle occurs.
}
Please note that there is a test for the plugin.
- Support native
- Support plugin (
gradle, maven etc)