title: Assemble gradle flavour compiles dependencies from other flavors
body: <p>We are trying to develop 2 gradle flavors to speed up our development process:</p>
  
  <ul>
  <li>the local flavor that compiles our libraries as modules</li>
  <li>the remote flavor that uses the latest SNAPSHOTS of our libraries</li>
  </ul>
  
  <p>I have declared two flavors in gradle:</p>
  
  <pre><code>productFlavors {
      local {}
  
      remote {}
  }
  </code></pre>
  
  <p>For now, let's assume that both our local and remote libraries are available as local modules (for debugging purpose). <a href="https://bitbucket.org/Blenderudit/flavor_sample" rel="nofollow">I have created a sample project here.</a> Since each library has sub libraries that are also supposed to be local or remote, I have added:</p>
  
  <pre><code>dependencies {
      localCompile project(path: ':mylibrary', configuration: "localDebug")
      remoteCompile project(path: ':mylibrary2', configuration: "remoteRelease")
  }
  </code></pre>
  
  <p>Now it becomes tricky. If I call <code>gradle assembleLocalDebug</code>, I get this line:</p>
  
  <pre><code>:mylibrary2:compileRemoteReleaseJavaWithJavac UP-TO-DATE
  </code></pre>
  
  <p>In the case of the sample app, it compiles. But in our case, we have a project where the newest features cannot be found in the SNAPSHOTS (since they are not published yet). This shouldn't happen since we are building in local. Is there any way to prevent gradle from compiling the remote flavor?</p>