title: Intellij Idea 2016.3 complains about Android API level in non-Android module
body: <p>My project is build by gradle and is structured into <code>android</code>, <code>core</code>, <code>desktop</code> modules. Where <code>android</code> is an Android module, but both <code>core</code> and <code>desktop</code> modules are java modules. The <code>core</code> is dependency of both <code>android</code> and <code>desktop</code>. When I write (in <code>desktop</code>):</p>
  
  <pre><code>Queue&lt;P&gt; qeueue= new ArrayDeque&lt;P&gt;();
  </code></pre>
  
  <p>The Idea complains:</p>
  
  <blockquote>
    <p>Cast from ArrayDeque to Queue requires API level 9 (current min is 1)</p>
  </blockquote>
  
  <p>How can I avoid this complain? Disable the inspection on whole project doesn't seems right. I also do not want to convert the <code>desktop</code> to be an Android module.</p>
  
  <p>Project's build.gradle:</p>
  
  <pre><code>buildscript {
      repositories {
          // repositories 
      }
      dependencies {
          classpath 'com.android.tools.build:gradle:2.2.3'
      }
  }
  
  allprojects {
      apply plugin: "idea"
      version = '1.0'
      ext {
          appName = 'my-app-name'
      }
  
      repositories {
          // repositories 
      }
  }
  
  project(":desktop") {
      apply plugin: "java"
  
      dependencies {
          compile project(":core")
          // some dependencies here
      }
  }
  
  project(":android") {
      apply plugin: "android"
  
      configurations { natives }
  
      dependencies {
          compile project(":core")
          // some other dependencies here
      }
  }
  
  project(":core") {
      apply plugin: "java"
  
      dependencies {
          // some dependencies here
      }
  }
  </code></pre>
  
  <p>Core's build.gradle:</p>
  
  <pre><code>apply plugin: "java"
  
  sourceCompatibility = 1.6
  [compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
  sourceSets.main.java.srcDirs = ["src/", "postprocessing/", "gl/", "math/", "experiment/"]
  
  dependencies {
  }
  </code></pre>
  
  <p>Desktop's build.gradle:</p>
  
  <pre><code>apply plugin: "java"
  sourceCompatibility = 1.8
  sourceSets.main.java.srcDirs = ["src/", "experiment/", "resources/"]
  project.ext.mainClassName = "cz.plajt.wallp.hills.desktop.DesktopLauncher"
  project.ext.assetsDir = new File("../android/assets");
  
  task run(dependsOn: classes, type: JavaExec) {
      main = project.mainClassName
      classpath = sourceSets.main.runtimeClasspath
      standardInput = System.in
      workingDir = project.assetsDir
      ignoreExitValue = true
  }
  
  task dist(type: Jar) {
      from files(sourceSets.main.output.classesDir)
      from files(sourceSets.main.output.resourcesDir)
      from { configurations.compile.collect { zipTree(it) } }
      from files(project.assetsDir);
  
      manifest {
          attributes 'Main-Class': project.mainClassName
      }
  }
  dist.dependsOn classes
  
  dependencies {
  }
  </code></pre>