This message was deleted.
# community-support
s
This message was deleted.
v
If you don't want to have it manually configurable anyway, just ad-hoc use a detached configuration when you need it
a
what do you mean? I’ve tried using detached configurations before but they’re not very helpful because
extendsFrom()
doesn’t work, so there’s no way to transfer dependencies from one to another
v
Why would you want to?
a
so that I can re-use dependencies in different configurations
v
At the time you create and use the detached configuration, you can simply get the declared dependencies of the other configurations, iterate over them and declare them on your detached configuration.
estending makes most sense if you declare a named one in the beginning of the build so that later added dependencies are then available in both
a
sorry, I’m not sure what you mean by the example, or how it’s relevant to trying to conditionally exclude a dependency and it’s transient dependencies
v
It's an alternative. If you determine that you need the dependency, create a detached configuration, add your dependency you need on it and resolve it
a
ah okay, I think I don’t understand it because I can’t use detached configurations because I need to use
extendsFrom()
v
And I asked what for 🙂
Because I don't think you do
a
I’m not sure I can explain it well, but you can dig through the code if you like https://github.com/adamko-dev/dokkatoo
in short: users need to be able to control what Dokka Plugins are active by adding them to a Configuration, and it’s similar for other files, and those files are shared or used in other configurations
one specific example is a requirement to fetch the plugin JARs both with and without transitive dependencies