title: How to ignore a specific transitive dependency from all dependencies in Gradle
body: <p>How can I ignore a specific transitive dependency in Gradle?</p>
  
  <p>For example, many libraries (such as Spring and ...) depend on <code>commons-logging</code>, I want to replace <code>commons-logging</code> with <code>SLF4J</code> (and its jcl-over-slf4j bridge).</p>
  
  <p>Is it any way in my gradle script to mention it once, and not for each dependency which depends on <code>commons-logging</code>?</p>
  
  <p>I was thinking of an script, iterating on all dependencies and adding some <code>exclude</code> on all of them, is there any better solution? And how that script be like?</p>