https://github.com/davidschreiber/inspector-graphetto
Inspector Graphetto - Gradle task execution graph inspection and visualization plugin.
https://github.com/davidschreiber/inspector-graphetto
gradle gradle-android-plugin gradle-plugin gradle-task graphetto inspector-graphetto task-graph
Last synced: about 1 year ago
JSON representation
Inspector Graphetto - Gradle task execution graph inspection and visualization plugin.
- Host: GitHub
- URL: https://github.com/davidschreiber/inspector-graphetto
- Owner: davidschreiber
- License: mit
- Created: 2019-10-21T18:23:17.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-10-17T18:58:52.000Z (over 5 years ago)
- Last Synced: 2025-03-26T16:05:23.468Z (about 1 year ago)
- Topics: gradle, gradle-android-plugin, gradle-plugin, gradle-task, graphetto, inspector-graphetto, task-graph
- Language: Kotlin
- Homepage:
- Size: 127 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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):**
```groovy
plugins {
id 'at.droiddave.graphetto' version '0.0.1'
}
```
**In a `build.gradle.kts` Kotlin DSL file:**
```kotlin
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`.
```shell
$ ./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:
```shell
$ ./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:
```groovy
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`.
```groovy
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.
```groovy
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.