I'm reading about Gradle's detached dependency configurations and the API docs' method description says "Creates a configuration, but does not add it to this container". What I'd like to know is
Some initial searching revealed a plugin related reason but this was not conclusive.
To summarise what was mentioned here and in my own question on the Gradle forums the reason for using detached configurations is : Resolve artifacts in a general way for dependencies not declared in the build file.
For example, as mentioned by Al Jacinto above, for a plugin you would not want to "pollute" the project using the plugin with irrelevant dependencies. This would also prevent the project using the plugin from interfering with those plugin dependencies.
There's link in that post http://discuss.gradle.org/t/modify-dependencies-of-plugin-checkstyle-configurations/5969 The guy is complaining that the plugin configuration polluting the project configuration and he has to explicitly exclude it.
Second answer to you question, don't need to reattach. I guess it is just detached to the project but still available for the plugin.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With