Giter VIP home page Giter VIP logo

inspector-graphetto's Introduction

Inspector Graphetto

Inspector Graphetto is a Gradle build plugin to inspect and visualize the task execution graph of your build.

Installation

Inside your top-level Gradle file add the Inspector Graphetto plugin:

In a build.gradle file (Groovy):

plugins {
    id 'at.droiddave.graphetto' version '0.0.1'
}

In a build.gradle.kts Kotlin DSL file:

plugins {
    id("at.droiddave.graphetto") version "0.0.1"
}

Usage

Simply run a build, and Inspector Graphetto will write a GraphViz .dot file to build/reports/taskGraph/graph.dot.

$ ./gradlew assembleDebug
$ cat build/reports/taskGraph/graph.dot

strict digraph G {
  1 [ label=":someOtherTask" ];
  2 [ label=":someTask" ];
  2 -> 1;
}

You can also print the entire task dependency graph to the console:

$ ./gradlew assembleDebug -Dat.droiddave.graphetto.consoleOutput=TREE

 ── :someTask
    └── :someOtherTask

> Task :someOtherTask UP-TO-DATE
> Task :someTask UP-TO-DATE

BUILD SUCCESSFUL in 92ms

Configuration

The plugin registers an extension called graphetto on your project which can be used to configure the output:

graphetto {
    outputFile = new File(buildDir, 'reports/my-task-graph.dot')
    consoleOutput = at.droiddave.graphetto.ConsoleOutput.TREE
}

outputFile

Configures the path of the .dot output file containing the information about the task graph that was executed. Defaults to reports/taskGraph/graph.dot.

graphetto {
    outputFile = new File(buildDir, 'reports/my-task-graph.dot')
}

consoleOutput

Configures the type of console output produced by the plugin.

  • TREE will print the entire task dependency tree before after the configuration phase of your build.
  • NONE will not print any console output. This is the default.
graphetto {
    consoleOutput = at.droiddave.graphetto.ConsoleOutput.TREE
}

You can also override the current configuration by passing the -Dat.droiddave.graphetto.consoleOutput=TREE option when invoking your build on the command line.

inspector-graphetto's People

Contributors

davidschreiber avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

inspector-graphetto's Issues

Project name

Graphene (former Grapher) is a work-in-progress title for the project. The goal is to have a plugin name that is easy to remember, offers good discoverability, and does not clash with any major software or GitHub project.

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.