55Gradle Plugin to list project dependents of a project in multi-projects.
66
77## Usage
8+
89Using the https://docs.gradle.org/current/userguide/plugins.html#sec:plugins_block :
910
1011``` kts
@@ -33,19 +34,23 @@ apply(plugin = "io.github.bjoernmayer.gradle-project-dependents")
3334## Tasks
3435
3536### ` dependents `
37+
3638Displays a tree of dependent projects on the project, where the task was executed in.
3739
3840#### Example:
41+
3942Imagine a multi-project with Project A, Project B, Project C
4043
4144Project B ` build.gradle.kts ` :
45+
4246```
4347dependencies {
4448 implementation(project(":projectA"))
4549}
4650```
4751
4852Project C ` build.gradle.kts ` :
53+
4954```
5055dependencies {
5156 implementation(project(":projectA"))
@@ -54,11 +59,13 @@ dependencies {
5459```
5560
5661Executing the task:
62+
5763``` bash
5864./gradlew :projectA:dependents
5965```
6066
6167Expected output:
68+
6269``` bash
6370+--- project root-project-name:projectA
6471| +--- project root-project-name:projectB (implementation)
@@ -67,7 +74,9 @@ Expected output:
6774```
6875
6976## Configuration
77+
7078### ` excludedConfigurations `
79+
7180Configurations can be excluded from the printed graph by adding them to ` excludedConfigurations ` :
7281
7382``` kts
@@ -78,7 +87,37 @@ projectDependents {
7887}
7988```
8089
90+ ### ` generateStdOutGraph `
91+
92+ Default is set to ` true ` .
93+
94+ Setting this to ` false ` disables the usual graph of dependents.
95+
96+ ``` kts
97+ // build.gradle.kts
98+
99+ projectDependents {
100+ generateStdOutGraph = false
101+ }
102+ ```
103+
104+ ### ` generateYamlGraph `
105+
106+ Default is set to ` false ` .
107+
108+ Setting this will generate a ` graph.yaml ` in ` build/projectDependents/ ` .
109+ It is a yaml representation of the graph.
110+
111+ ``` kts
112+ // build.gradle.kts
113+
114+ projectDependents {
115+ generateYamlGraph = true
116+ }
117+ ```
118+
81119## Developing
120+
82121Checkout this repository next to some project, where you want to use it.
83122Then in the ` settings.gradle.kts ` of said project, add this:
84123
@@ -91,6 +130,7 @@ pluginManagement {
91130```
92131
93132Then, you can just apply the plugin like usual:
133+
94134``` kts
95135// build.gradle.kts
96136
0 commit comments