Code Monkey home page Code Monkey logo

archidoc's Introduction

ArchiDoc Gradle Plugin

Documenting Software Architecture Plugin

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]

For using plugin in gradle

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() }

run task archidoc

 ./gradlew arhidoc

Also plugin options avialable:

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()

Configuration for multiproject build:

project.tasks.getByName("archidoc").dependsOn 'build',**':subproject:build'**
archidoc {
    file "$buildDir/architecture/classdiagram.dot"
    packages = ['com.my', 'org.your']
    **multiProject()**
    enableAllInfo()
    verbose()
}

how to instantly get .PNG file

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)

howtouse

resultimagexample

what about 'really' architecture

Programming is an art. What does a framework look like? Below is a hierarchical class diagram for the google Truth framework (about 600 items!). Obtained by using the archidoc plug-in. OmniGraffle was used to convert dot→png.

ntruth600 hierarh plus

For inter class dependencies

Includes class references in local variables or intermediate values
 archidoc {
     file  "$buildDir/architecture/classdiagram.dot"
     packages = ['com.my']
     enableAllInfo()
       enableInterClassDependencies()
         enableExternalClasses()
 }
Here is the simpliest example

example1 example2

Here is example with enableExternalClasses

example3

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.