title: Cannot change dependencies of configuration (after enabling instant run)
body: <p>I just enabled <code>instant run</code> in my android studio project. (Followed the <a href="http://android-developers.blogspot.com/2015/11/android-studio-20-preview.html" rel="noreferrer">instructions here</a>)</p>
  
  <p>My project contains <code>git</code> submodules and somehow these do not compile anymore.</p>
  
  <p><strong>This is the error i get:</strong></p>
  
  <blockquote>
    <p>Error:(8, 0) Cannot change dependencies of configuration
    ':libraries:my_library:classpath' after it has been resolved.</p>
  </blockquote>
  
  <p>Any idea what could be wrong there ? </p>
  
  <p><strong>Top level build.gradle:</strong></p>
  
  <pre><code>buildscript {
  repositories {
      mavenCentral()
      jcenter()
      maven { url 'https://maven.fabric.io/public' }
  }
  
  dependencies {
      classpath 'com.android.tools.build:gradle:2.0.0-alpha1'
      classpath 'com.novoda:bintray-release:0.2.7'
      classpath 'io.fabric.tools:gradle:1.+'
  }}
  </code></pre>
  
  <p><strong>Module build.gradle:</strong></p>
  
  <pre><code>apply plugin: 'android'
  apply plugin: 'io.fabric'
  
  android {
  
      defaultConfig {
         versionCode 4850
         versionName '4850'
         compileSdkVersion 23
         buildToolsVersion '23.0.1'
      }
  
      packagingOptions {
          exclude 'META-INF/LICENSE'
          exclude 'META-INF/MANIFEST.MF'
          exclude 'META-INF/NOTICE'
      }
  
      compileOptions {
          sourceCompatibility JavaVersion.VERSION_1_7
          targetCompatibility JavaVersion.VERSION_1_7
      }
  
      useLibrary 'org.apache.http.legacy'
  }
  
  repositories {
      mavenCentral()
      jcenter()
  }
  
  
  dependencies {
      [skip]
      compile project(':libraries:my_library:sdk')
  }
  </code></pre>
  
  <p><strong>Library build.gradle</strong></p>
  
  <pre><code>apply plugin: 'com.android.library'
  
  android {
      compileSdkVersion 23
      buildToolsVersion '23.0.2'
  
      defaultConfig {
          minSdkVersion 14
          targetSdkVersion 23
      }
  
      lintOptions {
          abortOnError false
      }
  }
  
  repositories {
      mavenCentral()
  }
  
  dependencies {
      compile fileTree(include: '*.jar', dir: 'libs')
      compile 'com.android.support:support-v4:23.1.0'
      compile 'com.android.support:appcompat-v7:23.1.0'
  
      testCompile 'junit:junit:4.12'
  
  }
  </code></pre>