title: Keep specific dependencies order for Android Studio
body: <p>I'm trying to run unit tests with Robolectric in Android Studio. I'm almost there - I see:</p>
  
  <pre><code>!!! JUnit version 3.8 or later expected:
  
  java.lang.RuntimeException: Stub!
      at junit.runner.BaseTestRunner.&lt;init&gt;(BaseTestRunner.java:5)
      at junit.textui.TestRunner.&lt;init&gt;(TestRunner.java:54)
      at junit.textui.TestRunner.&lt;init&gt;(TestRunner.java:48)
      at junit.textui.TestRunner.&lt;init&gt;(TestRunner.java:41)
      at com.intellij.rt.execution.junit.JUnitStarter.junitVersionChecks(JUnitStarter.java:185)
      ...
  </code></pre>
  
  <p>I see also all required dependencies in class path. To fix this error I need to put junit4 dependency before android sdk dependency. Unfortunately I don't see module in <em>Project Structure</em> section and I don't know how to edit <em>iml</em> file to archive this.</p>
  
  <p>Here is screenshot from my project structure:
  <img src="https://i.stack.imgur.com/DTb0c.png" alt="enter image description here"></p>
  
  <p>My gradle file:</p>
  
  <pre><code>sourceSets {
     testLocal {
        java.srcDir file('src/test/java')
        resources.srcDir file('src/test/resources')
     }
  }
  
  dependencies {
      // compatibility
      compile 'android.compatibility:android-support:v4-r13'
      compile 'com.actionbarsherlock:actionbarsherlock:4.4.0@aar'
  
      testLocalCompile 'junit:junit:4.11'
      testLocalCompile 'org.robolectric:robolectric:2.2'
      testLocalCompile 'org.easytesting:fest-assert-core:2.0M10'
  }
  
  android {
      buildToolsVersion "17"
      compileSdkVersion 18
  
      productFlavors {
         testLocal{
         }
      }
  }
  </code></pre>
  
  <p>And I selected <em>testLocal</em> flavour in AS.</p>