Configurations are used as seen in the graph. Every module uses the library, which exposes dependencies in config api. config implementation extendsFrom config api.
The installer copies all dependencies jars from local and api into one folder. When transitive dependencies have different versions of same libraries, they both get copied without resolution. The Gradle tasks looks something like
if ('local' == cfg.name || 'localApi' == cfg.name) { //localApi extends apiElements aka api
instSpec.into(group.name + '/lib') {
include "**/*.jar"
from cfg
}
}
Sadly I need local, because implementation is canBeResolved=false. Any idea how to fix this?
To me it is pretty unclear what you ask and what your situation is exactly.
Can you maybe share an MCVE that shows your situation?
Also, what do you mean with
Sadly I need local, because implementation is canBeResolved=false. Any idea how to fix this?
? implementation is a configuration of type “dependency bucket” so only for declaring dependencies.
If your local is for declaring and resolving dependencies, that’s bad practice anyway,
and you use the new convenience methods to create configurations with proper roles,
you also could not create such one.
A configuration should always be either consumable, or resolvable, or declarable, but never have multiple roles at the same time.
What is your use-case for local?
What do you try to achieve?
Yes, if you copy multiple configurations to the same place, you have no conflict resolution between them.
If you need conflict resolution, you need to have them all in one configuration, within one project by extending other configurations, cross-project by depending on them.
But maybe this is more an XY-problem and not the actual solution you should be after.