mirror of
				https://github.com/gradle/gradle-build-action.git
				synced 2025-10-31 15:18:57 +08:00 
			
		
		
		
	Add example of using  DEPENDENCY_GRAPH_INCLUDE_PROJECTS to docs (#844)
				
					
				
			Users will currently need to spend some time working out the required regex when using `DEPENDENCY_GRAPH_INCLUDE_PROJECTS`. Providing an example will get users up to speed quicker. Signed-off-by: Andy Coates <8012398+big-andy-coates@users.noreply.github.com>
This commit is contained in:
		| @@ -461,7 +461,8 @@ You can provide this value via the `DEPENDENCY_GRAPH_INCLUDE_PROJECTS` environme | |||||||
| To restrict which Gradle configurations contribute to the report, you can filter configurations by name using a regular expression. | To restrict which Gradle configurations contribute to the report, you can filter configurations by name using a regular expression. | ||||||
| You can provide this value via the `DEPENDENCY_GRAPH_INCLUDE_CONFIGURATIONS` environment variable or system property. | You can provide this value via the `DEPENDENCY_GRAPH_INCLUDE_CONFIGURATIONS` environment variable or system property. | ||||||
|  |  | ||||||
| Example of a simple workflow that limits the dependency graph to `runtimeClasspath` configuration: | Example of a simple workflow that limits the dependency graph to `runtimeClasspath` configuration and to exclude `buildSrc` dependencies: | ||||||
|  |  | ||||||
| ```yaml | ```yaml | ||||||
| name: Submit dependency graph | name: Submit dependency graph | ||||||
| on: | on: | ||||||
| @@ -480,7 +481,10 @@ jobs: | |||||||
|       with: |       with: | ||||||
|         dependency-graph: generate-and-submit |         dependency-graph: generate-and-submit | ||||||
|     - name: Run a build, generating the dependency graph from 'runtimeClasspath' configurations |     - name: Run a build, generating the dependency graph from 'runtimeClasspath' configurations | ||||||
|       run: ./gradlew build -DDEPENDENCY_GRAPH_INCLUDE_CONFIGURATIONS=runtimeClasspath |       run: ./gradlew build | ||||||
|  |       env: | ||||||
|  |         DEPENDENCY_GRAPH_INCLUDE_CONFIGURATIONS: runtimeClasspath | ||||||
|  |         DEPENDENCY_GRAPH_INCLUDE_PROJECTS: "^:(?!buildSrc).*" | ||||||
| ``` | ``` | ||||||
|  |  | ||||||
| ### Gradle version compatibility | ### Gradle version compatibility | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user