Gradle dependencies defined with custom Configuration are not displayed in IntelliJ

Answered

Hi, I am working on a Gradle plugin which provides custom Configuration used to define dependencies.

When a dependency is declared in a project using my custom Configuration, it correctly works when executing a Gradle task, but the dependency is not displayed in IntelliJ Gradle tasks view, same for the External Libraries of the project. For example if the following dependencies are declared:

dependencies {
    customConfig("org.example:library:1.0.0")
    testImplementation("org.junit.jupiter:junit-jupiter")
}

Only the dependency that uses testImplementation is displayed:

Is there a solution to display dependencies defined with custom Configuration ?

0
4 comments

The IDE shows dependencies for the runtime and compile scopes for configuration that are associated with source sets. It doesn't show dependencies for others because they don't affect IDE compilation and highlighting. You can use the Gradle dependency analyzer which shows all dependencies in all Gradle configurations.

0

Indeed the Dependency analyzer displays all my dependencies, thank you.

In my opinion it could still be practical  for an user to directly have all the project's dependencies listed in the Gradle tasks view. Should I create a Feature request for that?

0

Please sign in to leave a comment.