All Projects → dorongold → Gradle Task Tree

dorongold / Gradle Task Tree

Licence: apache-2.0
Gradle plugin that adds a 'taskTree' task that prints task dependency tree

Programming Languages

groovy
2714 projects

Projects that are alternatives of or similar to Gradle Task Tree

Gradle Android Ribbonizer Plugin
Modifies launcher icons on debug build
Stars: ✭ 350 (-38.92%)
Mutual labels:  gradle-plugin
Dependency Analysis Android Gradle Plugin
Gradle plugin for Java, Kotlin, and Android projects. Provides advice for managing dependencies and other applied plugins
Stars: ✭ 409 (-28.62%)
Mutual labels:  gradle-plugin
Gradle Tomcat Plugin
Gradle plugin supporting deployment of your web application to an embedded Tomcat web container
Stars: ✭ 516 (-9.95%)
Mutual labels:  gradle-plugin
Detekt
Static code analysis for Kotlin
Stars: ✭ 4,169 (+627.57%)
Mutual labels:  gradle-plugin
Androidautotrack
Android Asm 插桩 教学
Stars: ✭ 378 (-34.03%)
Mutual labels:  gradle-plugin
Bnd
Bnd/Bndtools. Tooling to build OSGi bundles including Eclipse, Maven, and Gradle plugins.
Stars: ✭ 446 (-22.16%)
Mutual labels:  gradle-plugin
Gradle Play Publisher
GPP is Android's unofficial release automation Gradle Plugin. It can do anything from building, uploading, and then promoting your App Bundle or APK to publishing app listings and other metadata.
Stars: ✭ 3,690 (+543.98%)
Mutual labels:  gradle-plugin
Let
Annotation based simple API flavored with AOP to handle new Android runtime permission model
Stars: ✭ 532 (-7.16%)
Mutual labels:  gradle-plugin
Gradle Static Analysis Plugin
Easy setup of static analysis tools for Android and Java projects.
Stars: ✭ 398 (-30.54%)
Mutual labels:  gradle-plugin
Laziertracker
本项目通过Android字节码插桩插件实现Android端无埋点(或自动埋点),并且支持根据配置文件实现业务数据的自动采集。
Stars: ✭ 485 (-15.36%)
Mutual labels:  gradle-plugin
Calces Gradle Plugin
Android构建工具集:包含快速实现组件化构建脚本,快速实现屏幕最小宽度适配脚本
Stars: ✭ 366 (-36.13%)
Mutual labels:  gradle-plugin
Gradle Js Plugin
Gradle plugin for working with JS
Stars: ✭ 376 (-34.38%)
Mutual labels:  gradle-plugin
Gradle Test Logger Plugin
A Gradle plugin for printing beautiful logs on the console while running tests
Stars: ✭ 460 (-19.72%)
Mutual labels:  gradle-plugin
Gradle Errorprone Plugin V0.0.x
Gradle plugin to use the error-prone compiler for Java
Stars: ✭ 351 (-38.74%)
Mutual labels:  gradle-plugin
Can I Drop Jetifier
Gradle plugin that checks if there are dependencies using support library instead of AndroidX.
Stars: ✭ 520 (-9.25%)
Mutual labels:  gradle-plugin
Gradle Android Command Plugin
Handy commands for testing Android on CI
Stars: ✭ 349 (-39.09%)
Mutual labels:  gradle-plugin
Javafx Gradle Plugin
Gradle plugin for JavaFX
Stars: ✭ 425 (-25.83%)
Mutual labels:  gradle-plugin
Gradle Git
Git plugin for Gradle
Stars: ✭ 559 (-2.44%)
Mutual labels:  gradle-plugin
Multi Os Engine
Multi-OS Engine: Create iOS Apps in Java (or Kotlin ... etc.)
Stars: ✭ 529 (-7.68%)
Mutual labels:  gradle-plugin
Gradle Download Task
Adds a download task to Gradle that displays progress information
Stars: ✭ 478 (-16.58%)
Mutual labels:  gradle-plugin

Gradle Task Tree

version

Gradle plugin that adds a taskTree task that prints task dependency tree report to the console.

The task dependency tree is printed with a similar format to that of the built-in dependencies task.

Installation

The plugin can be configured in the build script or in an init script.

The plugin is published on Gradle Plugin Portal.

Build Script Snippet

buildscript {
  repositories {
    maven {
      url "https://plugins.gradle.org/m2/"
    }
  }
  dependencies {
    classpath "gradle.plugin.com.dorongold.plugins:task-tree:1.5"
  }
}

apply plugin: "com.dorongold.task-tree"

Alternative Build Script Snippet (using the incubating "plugins" mechanism ):

plugins {
    id "com.dorongold.task-tree" version "1.5"
}

Init Script Snippet

To use this plugin in all your projects, put the following in a file named init.gradle in the $USER_HOME/.gradle/ directory, or any file ending in .gradle in the $USER_HOME/.gradle/init.d/ directory. See here for more information on initialization scripts.

initscript {
    repositories {
        maven { url "https://plugins.gradle.org/m2" }
    }
    dependencies {
	classpath "gradle.plugin.com.dorongold.plugins:task-tree:1.5"
    }
}
rootProject {
    apply plugin: com.dorongold.gradle.tasktree.TaskTreePlugin
}

Usage

gradle <task 1>...<task N> taskTree

When one of the tasks given to the gradle command is taskTree, execution of all the other tasks on that line is skipped. Instead, their task dependency tree is printed.

Examples

gradle build taskTree

:build
+--- :assemble
|    \--- :jar
|         \--- :classes
|              +--- :compileJava
|              \--- :processResources
\--- :check
     \--- :test
          +--- :classes
          |    +--- :compileJava
          |    \--- :processResources
          \--- :testClasses
               +--- :compileTestJava
               |    \--- :classes
               |         +--- :compileJava
               |         \--- :processResources
               \--- :processTestResources

gradle compileJava taskTree

:compileJava
No task dependencies

gradle taskTree javadoc test check

:javadoc
\--- :classes
     +--- :compileJava
     \--- :processResources

:test
+--- :classes
|    +--- :compileJava
|    \--- :processResources
\--- :testClasses
     +--- :compileTestJava
     |    \--- :classes
     |         +--- :compileJava
     |         \--- :processResources
     \--- :processTestResources

:check
\--- :test
     +--- :classes
     |    +--- :compileJava
     |    \--- :processResources
     \--- :testClasses
          +--- :compileTestJava
          |    \--- :classes
          |         +--- :compileJava
          |         \--- :processResources
          \--- :processTestResources

Configuration

When running the taskTree task from command-line, you can add the flag: --no-repeat.
This prevents sections of the tree from being printed more than once.
For a large task-tree it has the effect of reducing the size of output without loosing information.
To limit the depth of the printed tree add the command-line option: --task-depth <number>.

You may add a configuration block for taskTree in your build.gradle (or, in case you take the Init Script approach, your init.gradle). In the configuration block you can set:

  • noRepeat = true has the same effect as passing --no-repeat to taskTree at command-line.
  • impliesSubProjects = true in a multi-project, taskTree will print the task-tree of the current project only (the default is to print the task-tree of current and child projects). This can reduce the size of output.
  • taskDepth = <number> e.g: taskDepth = 3 limits the depth of the printed tree.
//optional configuration
taskTree{
    noRepeat = true  //do not print a sub-tree in the task-tree more than once
    impliesSubProjects = true  //do not print task-tree for child projects in a multi-project
    taskDepth = 3 // limit tree depth to 3. Equivalent to running with the --task-depth option.
}

Note:

In a multi-project, it is recommended to apply the plugin on the root project only. The taskTree task will automatically be added to child projects.
I.e. it is unnecessary to apply this plugin under allprojects or subprojects.

Version Compatibility

Gradle 2.3+
Java 1.7+

Acknowledgements

Some functionality is based on gradle-visteg plugin - a plugin that creates an image with a DAG representation of the task tree.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].