title: gradle 4.10 + java11 = dependency version detection problem with spring(and many other libraries)
body: <p>I'm working under project conversion from java 8 to 11 + gradle 4.5 -> 4.10.3 and found very strange thing for me. gradle take wrong jar versions . for example part of </p>
  
  <blockquote>
    <p>gradle dependencies</p>
  </blockquote>
  
  <pre><code>\--- org.springframework.security:spring-security-web:5.1.3.RELEASE -&gt; 4.2.2.RELEASE
      Line 407: |              +--- org.springframework:spring-beans:4.3.5.RELEASE -&gt; 5.1.4.RELEASE (*)
      Line 408: |              +--- org.springframework:spring-context:4.3.5.RELEASE -&gt; 5.1.4.RELEASE (*)
      Line 409: |              +--- org.springframework:spring-core:4.3.5.RELEASE -&gt; 5.1.4.RELEASE (*)
      Line 410: |              +--- org.springframework:spring-expression:4.3.5.RELEASE -&gt; 5.1.4.RELEASE (*)
      Line 411: |              \--- org.springframework:spring-web:4.3.5.RELEASE -&gt; 5.1.4.RELEASE (*)
      Line 419: |    |    |    +--- com.fasterxml.jackson.core:jackson-databind:2.9.8 -&gt; 2.8.7 (*)
      Line 420: |    |    |    +--- com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.9.8 -&gt; 2.8.7
      Line 423: |    |    |    +--- com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.9.8 -&gt; 2.8.7
      Line 427: |    |    |    \--- com.fasterxml.jackson.module:jackson-module-parameter-names:2.9.8 -&gt; 2.8.7
      Line 432: |    |    |    +--- org.apache.tomcat.embed:tomcat-embed-core:9.0.14 -&gt; 8.5.11
      Line 433: |    |    |    +--- org.apache.tomcat.embed:tomcat-embed-el:9.0.14 -&gt; 8.5.11
      Line 434: |    |    |    \--- org.apache.tomcat.embed:tomcat-embed-websocket:9.0.14 -&gt; 8.5.11
      Line 437: |    |    |    +--- javax.validation:validation-api:2.0.1.Final -&gt; 1.1.0.Final
      Line 438: |    |    |    +--- org.jboss.logging:jboss-logging:3.3.2.Final -&gt; 3.3.0.Final
  </code></pre>
  
  <p>spring-security-web:5.1.3.RELEASE -> 4.2.2.RELEASE !!!<br>
  tomcat-embed-core:9.0.14 -> 8.5.11!!! <br>
  tomcat-embed-el:9.0.14 -> 8.5.11!!!<br>
  org.apache.tomcat.embed:tomcat-embed-websocket:9.0.14 -> 8.5.11!!!<br>
  and application failed in runtime:</p>
  
  <pre><code>An attempt was made to call the method org.apache.coyote.AbstractProtocol.setAcceptCount(I)V but it does not exist. Its class, org.apache.coyote.AbstractProtocol, is available from the following locations:
  
   jar:file:/C:/yyyyyyyyyyyyyy/bin/java/TxVersionServer/lib/tomcat-embed-core-8.5.11.jar!/org/apache/coyote/AbstractProtocol.class
  
   It was loaded from the following location:
  
   file:/C:/Program%20Files/Dalet/DaletPlus/bin/java/TxVersionServer/lib/tomcat-embed-core-8.5.11.jar
  </code></pre>
  
  <p>it mean gradle use version X for compilation and version Y for runtime, why compilation was not failed ? method exists only in version 9. compilation must fail on it, no? how I can avoid it? looks like I need specify version of 3d party dependencies in my gradle too, for example: A depends on B , B depends on C, and I need to write in A: A depends on B and A depends on C. I tested it and this work, but it's look very and very wrong way. any ideas how to resolve dependencies without such version hops.</p>