Excluding multiple transitive dependencies from runtime configuration


#1

Hi , I have a compile time dependency which transitively brings number of additional jars with it.

What is the correct syntax to remove number of transitive dependencies from runtime configuration only?

I.e. I want to have an effect similar to “provided” scope, but since I cannot control transitive dependencies directly I have to use exclude.

Thanks in advance.


(Jean-Baptiste Nizet) #2

According to the user guide, you would use, for example

configurations {

runtime.exclude group: ‘org.unwanted’, module: ‘iAmProvided’

}