How to get an idea of ​​the dependency for the configuration of "implementation"?

Based on the documentation ( 4.7.6 - Having received an idea of ​​a specific dependency ), we can get information about a specific configuration with an indication of the configuration itself. In this example, they are used as a compile configuration, which is deprecated. I tried to reproduce the same command, replacing the compile configuration in the build.gradle the implementation configuration (as I received, we should no longer use compile ). But when I run:

 gradle dependencyInsight --dependency groovy --configuration implementation 

Gradle returns:

 Execution failed for task ':dependencyInsight'. Resolving configuration 'implementation' directly is not allowed 

My build.gradle file is as follows:

 apply plugin: 'java-library' repositories { jcenter() } dependencies{ implementation 'org.codehaus.groovy:groovy-all:2.4.10' } 

Does this mean that I can’t get an idea of ​​the dependency if I use implementation or is there another way to get it?

+5
source share
1 answer

I had a similar problem and I asked her and got an answer:

Configuration is a compileClasspath. If you have options, there is a configuration option for the option (i.e., for the release option, your configuration will be releaseCompileConfiguration ).


full example - no options: gradle dependencyInsight --dependency groovy --configuration compileClasspath
full example - release option: gradle dependencyInsight --dependency groovy --configuration releaseCompileClasspath

+2
source

Source: https://habr.com/ru/post/1272717/


All Articles