title: Gradle: Overriding Dependency with Different Name
body: <p>I am trying to import <a href="http://mvnrepository.com/artifact/org.scalatra/scalatra-atmosphere/2.2.0-RC3" rel="nofollow"><code>org.scalatra:scalatra-atmosphere:2.2.0-RC3</code></a> into a Scala 2.10 project. The issue is that this package depends on the two non-Scala-versioned packages <code>com.typesafe.akka:akka-actor:2.0.4</code> and <code>com.typesafe.akka:akka-testkit:2.0.4</code> (<code>org.scala-lang:scala-library:2.9.2</code> and <code>org.scalatra:scalatra-json:2.2.0-RC3</code> should work fine, as they will go to newest). As far as I can tell, the Akka dependencies do not exist on Maven Central, so we have broken packages.</p>
  
  <p>I would like to override <code>org.scalatra:scalatra-atmosphere:2.2.0-RC3</code>'s dependencies by hand by replacing the non-Scala-versioned packages with Scala-versioned packages that actually exist:</p>
  
  <pre><code>configurations.all {
      resolutionStrategy {
          eachDependency { details -&gt;
              if (details.requested.group == 'com.typesafe.akka') {
                  details.requested.name += "_$scalaVersion"
                  details.useVersion '2.1.0'
              }
          }
      }
  }
  </code></pre>
  
  <p>Unfortunately, this technique appears to be explicitly disallowed as of Gradle 1.4:</p>
  
  <pre><code> What went wrong:
  Could not resolve all dependencies for configuration ':compile'.
  &gt; new ModuleRevisionId MUST have the same ModuleId as original one. original = com.typesafe.akka#akka-actor new = com.typesafe.akka#akka-actor_2.10
  </code></pre>
  
  <p>Is there a legitimate way to work around this issue?</p>