Intellij-idea gradle sub-module keeps forgetting root project dependency
<p>I have two gradle projects defined like so</p>

<pre>
apiclient (root)
  | src\
  | build.gradle
  |--- android (module)
         | src\
         | build.gradle
</pre>

<p>These projects are not on maven, yet, and the module apiclient.android depends on the root module (apiclient). </p>

<p>I keep adding apiclient using the project structure... -> dependency dialog and the reference keeps getting removed from the .iml file whenever I click refresh in the gradle tool window.</p>

<p>how can I keep the child module from forgetting the parent module dependency?</p>

<p>edit: as requested the build.gradle files.</p>

<p><strong>apiclient build.gradle</strong></p>

<pre><code>group 'emby.apiclient'
version '1.0-SNAPSHOT'

apply plugin: 'java'

sourceCompatibility = 1.7

repositories {
    mavenCentral()
}

dependencies {
    compile 'org.codehaus.groovy:groovy-all:2.3.11'
    testCompile group: 'junit', name: 'junit', version: '4.11'
    compile 'com.google.guava:guava:18.0'
    compile 'org.java-websocket:Java-WebSocket:1.3.0'
}
</code></pre>

<p><strong>apiclient.android build.gradle</strong></p>

<pre><code>group 'emby.apiclient'
version '1.0-SNAPSHOT'

apply plugin: 'java'

sourceCompatibility = 1.7

repositories {
    mavenCentral()
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'org.codehaus.groovy:groovy-all:2.3.11'
    testCompile group: 'junit', name: 'junit', version: '4.11'
    compile 'com.google.code.gson:gson:2.5'
    compile 'com.mcxiaoke.volley:library:1.0.16'
    compile 'com.squareup.okhttp:okhttp:2.1.0'
    compile 'com.squareup.okhttp:okhttp-urlconnection:2.1.0'
    compile 'emby.apiclient:apiclient:1.0-SNAPSHOT'
}
</code></pre>

<p>The last line <code>compile 'emby.apiclient:apiclient:1.0-SNAPSHOT'</code> is underlined red in the gradle project window. I've tried <code>compile project 'apiclient'</code> as well and the outcome is unchanged.</p>

<p><strong>settings.gradle</strong></p>

<pre><code>rootProject.name = 'apiclient'
include 'android'
findProject(':android')?.name = 'emby.apiclient.android'
</code></pre>