Skip to content

Commit bf01462

Browse files
committed
Improve documentation for configuration filtering
1 parent 94c5357 commit bf01462

File tree

1 file changed

+20
-12
lines changed

1 file changed

+20
-12
lines changed

README.md

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -45,27 +45,35 @@ eg: Env var `DEPENDENCY_GRAPH_REPORT_DIR` can be set with `-DDEPENDENCY_GRAPH_RE
4545
If you do not want to include every dependency configuration in every project in your build, you can limit the
4646
dependency extraction to a subset of these.
4747

48-
To restrict which Gradle subprojects contribute to the report, specify which projects to include via a regular expression.
49-
You can provide this value via the `DEPENDENCY_GRAPH_INCLUDE_PROJECTS` environment variable or system property.
48+
The following parameters control the set of projects and configurations that contribute dependencies.
49+
Each of these is a regular expression value, and can set either as an environment variable or as a system property on the command line.
5050

51-
To restrict which Gradle configurations contribute to the report, you can filter configurations by name using a regular expression.
52-
You can provide this value via the `DEPENDENCY_GRAPH_INCLUDE_CONFIGURATIONS` environment variable or system property.
51+
| Property | Description | Default |
52+
|-----------------------------------------|---------------------------|---------------------------------|
53+
| DEPENDENCY_GRAPH_INCLUDE_PROJECTS | Projects to include | All projects are included |
54+
| DEPENDENCY_GRAPH_EXCLUDE_PROJECTS | Projects to exclude | No projects are included |
55+
| DEPENDENCY_GRAPH_INCLUDE_CONFIGURATIONS | Configurations to include | All configurations are included |
56+
| DEPENDENCY_GRAPH_EXCLUDE_CONFIGURATIONS | Configurations to exclude | No configurations are included |
5357

5458
### Controlling the scope of dependencies in the dependency graph
5559

5660
The GitHub dependency graph allows a scope to be assigned to each reported dependency.
5761
The only permissible values for scope are 'runtime' and 'development'.
5862

59-
By default, no scope is assigned to dependencies in the graph. To enable scopes in the generated dependency graph,
60-
at least one of `DEPENDENCY_GRAPH_RUNTIME_PROJECTS` or `DEPENDENCY_GRAPH_RUNTIME_CONFIGURATIONS` must be configured.
63+
The following parameters control the set of projects and configurations that provide 'runtime' scoped dependencies.
64+
Any dependency resolution that does not match these parameters will be scoped 'development'.
6165

62-
To restrict which Gradle subprojects contribute 'runtime' dependencies to the report, specify which projects to include via a regular expression.
63-
You can provide this value via the `DEPENDENCY_GRAPH_RUNTIME_PROJECTS` environment variable or system property.
64-
For a project not matching this filter, all dependencies will be scoped 'development'.
66+
Each of these parameters is a regular expression value, and can set either as an environment variable or as a system property on the command line.
6567

66-
To restrict which Gradle configurations contribute 'runtime' dependencies to the report, you can filter configurations by name using a regular expression.
67-
You can provide this value via the `DEPENDENCY_GRAPH_RUNTIME_CONFIGURATIONS` environment variable or system property.
68-
Dependencies resolved by a matching configuration will be scoped 'runtime': all other dependencies will be scoped 'development'.
68+
| Property | Description | Default |
69+
|-------------------------------------------------|-----------------------------------------------------------|---------------------------------|
70+
| DEPENDENCY_GRAPH_RUNTIME_INCLUDE_PROJECTS | Projects that can provide 'runtime' dependencies | All projects are included |
71+
| DEPENDENCY_GRAPH_RUNTIME_EXCLUDE_PROJECTS | Projects that do not provide 'runtime' dependencies | No projects are included |
72+
| DEPENDENCY_GRAPH_RUNTIME_INCLUDE_CONFIGURATIONS | Configurations that contain 'runtime' dependencies | All configurations are included |
73+
| DEPENDENCY_GRAPH_RUNTIME_EXCLUDE_CONFIGURATIONS | Configurations that do not contain 'runtime' dependencies | No configurations are included |
74+
75+
By default, no scope is assigned to dependencies in the graph. To enable scopes in the generated dependency graph,
76+
at least one of these parameters must be configured.
6977

7078
For dependencies that are resolved in multiple projects and/or multiple configurations, only a single 'runtime' scoped resolution
7179
is required for that dependency to be scoped 'runtime'.

0 commit comments

Comments
 (0)