title: Add project on outer level as dependency to module
body: <p>I have a project that looks something like this:</p>
  
  <pre><code>mainProject/
      mainModule
  proj1/
      module1
  proj2/
      module2
  </code></pre>
  
  <p>and what I'm trying to do is add <code>proj1</code> and <code>proj2</code> as dependencies to <code>mainProject</code>. I've gotten it to the point where I can import classes from the projects and everything seems to work fine (no "can't resolve symbol" errors), but as soon as I build the project, I get a bunch of errors like:</p>
  
  <blockquote>
    <p>Gradle: error: package com.domain.proj1 does not exist</p>
    
    <p>Gradle: error: cannot find symbol class Class1</p>
  </blockquote>
  
  <p>in classes that when I open them, I can navigate to declarations, see usages, and see no red writing!</p>
  
  <p>When I added the <code>proj1</code> and <code>proj2</code> modules to the project and started using them, Intellij even suggested adding the dependency to the different projects. The thing I think is odd though is that these changes to dependencies aren't reflected anywhere in my <code>mainModule</code>'s <code>build.gradle</code> file.</p>
  
  <p>I've been looking for hours for a solution, and I have looked at a bunch of other questions here on Stack Overflow, and would really appreciate an answer.
  Thanks!</p>