kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From maniku...@apache.org
Subject [kafka] branch 2.4 updated: MINOR: add dependency analysis debugging tasks
Date Sat, 16 Nov 2019 09:09:44 GMT
This is an automated email from the ASF dual-hosted git repository.

manikumar pushed a commit to branch 2.4
in repository https://gitbox.apache.org/repos/asf/kafka.git


The following commit(s) were added to refs/heads/2.4 by this push:
     new c09c217  MINOR: add dependency analysis debugging tasks
c09c217 is described below

commit c09c2175f67fb15bdadf8eb2fd1b5ac860c0e545
Author: Arvind Thirunarayanan <athirunar@confluent.io>
AuthorDate: Sat Nov 16 14:38:35 2019 +0530

    MINOR: add dependency analysis debugging tasks
    
    Author: Arvind Thirunarayanan <athirunar@confluent.io>
    
    Reviewers: Colin Patrick McCabe <colin@cmccabe.xyz>
    
    Closes #7694 from arvindth/ath-debugdeps-task
    
    (cherry picked from commit 255fcdc2369dccb03c91b14b99a177bce6e966ea)
    Signed-off-by: Manikumar Reddy <manikumar@confluent.io>
---
 README.md    | 12 ++++++++++++
 build.gradle |  8 ++++++++
 2 files changed, 20 insertions(+)

diff --git a/README.md b/README.md
index 308d9df..76fbc4e 100644
--- a/README.md
+++ b/README.md
@@ -200,6 +200,18 @@ The following options should be set with a `-P` switch, for example `./gradlew
-
 * `testLoggingEvents`: unit test events to be logged, separated by comma. For example `./gradlew
-PtestLoggingEvents=started,passed,skipped,failed test`.
 * `xmlSpotBugsReport`: enable XML reports for spotBugs. This also disables HTML reports as
only one can be enabled at a time.
 
+### Dependency Analysis ###
+
+The gradle [dependency debugging documentation](https://docs.gradle.org/current/userguide/viewing_debugging_dependencies.html)
mentions using the `dependencies` or `dependencyInsight` tasks to debug dependencies for the
root project or individual subprojects.
+
+Alternatively, use the `allDeps` or `allDepInsight` tasks for recursively iterating through
all subprojects:
+
+    ./gradlew allDeps
+
+    ./gradlew allDepInsight --configuration runtime --dependency com.fasterxml.jackson.core:jackson-databind
+
+These take the same arguments as the builtin variants.
+
 ### Running system tests ###
 
 See [tests/README.md](tests/README.md).
diff --git a/build.gradle b/build.gradle
index fbf5824..c55a2af 100644
--- a/build.gradle
+++ b/build.gradle
@@ -143,6 +143,14 @@ if (file('.git').exists()) {
 
 
 subprojects {
+
+  // enable running :dependencies task recursively on all subprojects
+  // eg: ./gradlew allDeps
+  task allDeps(type: DependencyReportTask) {}
+  // enable running :dependencyInsight task recursively on all subprojects
+  // eg: ./gradlew allDepInsight --configuration runtime --dependency com.fasterxml.jackson.core:jackson-databind
+  task allDepInsight(type: DependencyInsightReportTask) doLast {}
+
   apply plugin: 'java'
   // apply the eclipse plugin only to subprojects that hold code. 'connect' is just a folder.
   if (!project.name.equals('connect')) {


Mime
View raw message