title: How do I resolve dependency conflicts with Gradle?
body: <p>I am developing a project with Dropwizard and Titan DB. Both depend on Google Guava. One depends on version 15 and the other on 18. This error occurs at runtime:</p>
  
  <pre><code>! java.lang.IllegalAccessError: tried to access method com.google.common.base.Stopwatch.&lt;init&gt;()V from class com.thinkaurelius.titan.graphdb.database.idassigner.StandardIDPool$ID
  BlockRunnable
  </code></pre>
  
  <p>I researched the error and <a href="https://groups.google.com/forum/#!topic/aureliusgraphs/vQ90mchs62s" rel="nofollow">found</a> that it was being caused by titan's Guava 
  15.0 dependency being evicted by Guava 18.0.</p>
  
  <p>I am new to Java and Gradle. I am using Gradle's <code>java</code> and <code>application</code> plugins to build and run the main class with <code>gradle run</code>. How can  I resolve this problem?</p>
  
  <hr>
  
  <p>Here is my <code>build.gradle</code>:</p>
  
  <pre><code>apply plugin: 'java'
  apply plugin: 'application'
  
  mainClassName = "com.example.rest.App"
  
  repositories {
      mavenCentral()
  }
  
  dependencies {
      compile (
          [group: 'io.dropwizard', name: 'dropwizard-core', version: '0.8.0-rc1'],
          [group: 'com.thinkaurelius.titan', name: 'titan-core', version: '0.5.1'],
          [group: 'com.thinkaurelius.titan', name: 'titan-berkeleyje', version: '0.5.1'],
          [group: 'com.tinkerpop', name: 'frames', version: '2.6.0']
      )
      testCompile group: 'junit', name: 'junit', version: '3.8.1'
  }
  
  run {  
      if ( project.hasProperty("appArgs") ) {  
          args Eval.me(appArgs)  
      }  
  }
  </code></pre>