title: Gradle dependency exclusion not working for transitive dependency
body: <p>I got the following Exception when I tried to start the server:</p>
  
  <p><code>Caused by: java.lang.IncompatibleClassChangeError: class org.springframework.core.type.classreading.ClassMetadataReadingVisitor has interface org.springframework.asm.ClassVisitor as super class</code></p>
  
  <p>Some stackoverflow post suggests that I have conflict versions of spring-asm in my classpath. Through gradle dependency analysis, I see that I don't have multiple versions of spring-asm, but I do have multiple versions of spring-core (version 3.1.4 and 5.0.2)</p>
  
  <pre><code>org.springframework:spring-core:5.0.2.RELEASE (conflict resolution)
  +--- runtime
  ...
  +--- project :foundation-util
  ...
  org.springframework:spring-core:3.1.4.RELEASE -&gt; 5.0.2.RELEASE
  +--- com.abc:adcontentserviceclient:1801
  |    +--- project :domain-cs-bl
  |    |    +--- runtime
  ...
  </code></pre>
  
  <p>I tried to exclude version 3.1.4 but couldn't get it working. I tried to exclude it both at the dependency level and the configuration level.</p>
  
  <pre><code>configurations {
      all*.exclude group: 'spring-framework', module: 'spring-core'
  }
  
  dependencies {
  
  compile(group: 'com.abc, name: 'adcontentserviceclient', version: "${adCsVersion}", changing: true) {
      exclude group: 'org.springframework', module: 'spring-core'
  }
  </code></pre>
  
  <p>Even with the above changes, I still find spring-core:3.1.4.RELEASE in dependency analysis output.</p>