You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by sc...@apache.org on 2019/01/25 20:38:13 UTC
[beam] branch master updated: Replace visteg plugin with
gradle-task-tree to visualize task dependency tree
This is an automated email from the ASF dual-hosted git repository.
scott pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/beam.git
The following commit(s) were added to refs/heads/master by this push:
new ef48df8 Replace visteg plugin with gradle-task-tree to visualize task dependency tree
new 40148f5 Merge pull request #7615: Replace visteg plugin with gradle-task-tree to visualize task dependency tree
ef48df8 is described below
commit ef48df8117052b76dea055daf1c6e22dd1c31022
Author: Scott Wegner <sc...@apache.org>
AuthorDate: Thu Jan 24 09:46:15 2019 -0800
Replace visteg plugin with gradle-task-tree to visualize task dependency
tree
Visualizing the Gradle task dependency tree is a useful tool for
debugging build issues. We previously used the visteg plugin, although
the project seems to be abandoned and not compatible with Gradle 5.0
This change switches over to using the gradle-task-tree plugin, which
gives similar functionality (although only prints the tree to the
commandline rather than a .dot file).
Usage:
./gradlew :myProject:myTask :myProject:taskTree
See: https://github.com/dorongold/gradle-task-tree
---
build.gradle | 9 +--------
.../main/groovy/org/apache/beam/gradle/BeamModulePlugin.groovy | 6 ++++++
2 files changed, 7 insertions(+), 8 deletions(-)
diff --git a/build.gradle b/build.gradle
index cc5db3a..bc9975e 100644
--- a/build.gradle
+++ b/build.gradle
@@ -57,8 +57,8 @@ buildscript {
classpath "com.diffplug.spotless:spotless-plugin-gradle:3.16.0" // Enable a code formatting plugin
classpath "gradle.plugin.com.github.blindpirate:gogradle:0.10" // Enable Go code compilation
classpath "gradle.plugin.com.palantir.gradle.docker:gradle-docker:0.20.1" // Enable building Docker containers
- classpath "cz.malohlava:visteg:1.0.3" // Enable generating Gradle task dependencies as ".dot" files
classpath "com.github.jengelman.gradle.plugins:shadow:4.0.4" // Enable shading Java dependencies
+ classpath "gradle.plugin.com.dorongold.plugins:task-tree:1.3.1" // Adds a 'taskTree' task to print task dependency tree
classpath "ca.coglinc:javacc-gradle-plugin:2.4.0" // Enable the JavaCC parser generator
classpath "gradle.plugin.io.pry.gradle.offline_dependencies:gradle-offline-dependencies-plugin:0.3" // Enable creating an offline repository
classpath "net.ltgt.gradle:gradle-errorprone-plugin:0.0.13" // Enable errorprone Java static analysis
@@ -83,13 +83,6 @@ if (!gradle.startParameter.isOffline()) {
apply plugin: "com.gradle.build-scan"
}
-// Apply a task dependency visualization plugin which creates a ".dot" file containing the
-// task dependencies for the current build. This command can help create a visual representation:
-// dot -Tsvg build/reports/visteg.dot > build_dependencies.svg
-//
-// See https://github.com/mmalohlava/gradle-visteg for further details.
-apply plugin: "cz.malohlava.visteg"
-
// This plugin provides a task to determine which dependencies have updates.
// Additionally, the plugin checks for updates to Gradle itself.
//
diff --git a/buildSrc/src/main/groovy/org/apache/beam/gradle/BeamModulePlugin.groovy b/buildSrc/src/main/groovy/org/apache/beam/gradle/BeamModulePlugin.groovy
index 3227179..d5a8e82 100644
--- a/buildSrc/src/main/groovy/org/apache/beam/gradle/BeamModulePlugin.groovy
+++ b/buildSrc/src/main/groovy/org/apache/beam/gradle/BeamModulePlugin.groovy
@@ -310,6 +310,12 @@ class BeamModulePlugin implements Plugin<Project> {
// when attempting to resolve dependency issues.
project.apply plugin: "project-report"
+ // Adds a taskTree task that prints task dependency tree report to the console.
+ // Useful for investigating build issues.
+ // See: https://github.com/dorongold/gradle-task-tree
+ project.apply plugin: "com.dorongold.task-tree"
+ project.taskTree { noRepeat = true }
+
/** ***********************************************************************************************/
// Define and export a map dependencies shared across multiple sub-projects.
//