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
This commit is contained in:
Arvind Thirunarayanan 2019-11-16 14:38:35 +05:30 committed by Manikumar Reddy
parent 400185421f
commit 255fcdc236
2 changed files with 20 additions and 0 deletions

View File

@ -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`. * `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. * `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 ### ### Running system tests ###
See [tests/README.md](tests/README.md). See [tests/README.md](tests/README.md).

View File

@ -143,6 +143,14 @@ if (file('.git').exists()) {
subprojects { 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 plugin: 'java'
// apply the eclipse plugin only to subprojects that hold code. 'connect' is just a folder. // apply the eclipse plugin only to subprojects that hold code. 'connect' is just a folder.
if (!project.name.equals('connect')) { if (!project.name.equals('connect')) {