How to List Gradle's Buildscript / Plugin Dependencies

Featured image for sharing metadata for article

Similarly to Configure Gradle to Allow Listing All Subproject Dependencies, it can be useful to find out the dependencies that are in use by your Gradle plugins.

Fortunately, there is the buildEnvironment Gradle task that allows us to list the project's buildscript dependencies (output trimmed for brevity):

> Task :buildEnvironment

------------------------------------------------------------
Root project - Spring Security OAuth2 Auto Configuration
------------------------------------------------------------

classpath
+--- io.spring.gradle:spring-build-conventions:0.0.28.RELEASE
|    +--- com.github.ben-manes:gradle-versions-plugin:0.25.0
...
|    +--- gradle.plugin.org.gretty:gretty:2.3.1
|    |    +--- org.gretty:gretty-core:2.3.1
...
|    |    |         \--- org.springframework.boot:spring-boot-dependencies:2.3.0.M4 (*)
|    |    +--- org.springframework.boot:spring-boot-loader-tools:1.5.12.RELEASE -> 2.3.0.M4
|    +--- org.springframework.boot:spring-boot-buildpack-platform:2.3.0.M4
...
|    +--- org.springframework.boot:spring-boot-loader-tools:2.3.0.M4 (*)
|    +--- io.spring.gradle:dependency-management-plugin -> 1.0.9.RELEASE
|    +--- org.apache.commons:commons-compress -> 1.19
|    +--- org.springframework:spring-core -> 5.2.5.RELEASE (*)
|    \--- org.springframework.boot:spring-boot-dependencies:2.3.0.M4 (*)
+--- io.spring.javaformat:spring-javaformat-gradle-plugin:0.0.20 (*)
\--- io.spring.nohttp:nohttp-gradle:0.0.4.RELEASE (*)

(c) - dependency constraint
(*) - dependencies omitted (listed previously)

A web-based, searchable dependency report is available by adding the --scan option.

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.3/userguide/command_line_interface.html#sec:command_line_warnings

BUILD SUCCESSFUL in 1s
1 actionable task: 1 executed

Written by Jamie Tanna's profile image Jamie Tanna on , and last updated on .

Content for this article is shared under the terms of the Creative Commons Attribution Non Commercial Share Alike 4.0 International, and code is shared under the Apache License 2.0.

#blogumentation #gradle #java.

This post was filed under articles.

Interactions with this post

Interactions with this post

Below you can find the interactions that this page has had using WebMention.

Have you written a response to this post? Let me know the URL:

Do you not have a website set up with WebMention capabilities? You can use Comment Parade.