Excluding multiple transitive dependencies from runtime configuration

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.

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

configurations {

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

}