title: Random unresolved reference error while executing gradle task
body: <p>I'm having some trouble while trying to execute <code>./gradlew bootRun</code> on a spring-boot application. </p>
  
  <p>The bizarre thing is that executing the main class through IntelliJ, everything runs perfectly. But when I try to execute via gradle task, I get the <code>Unresolved reference: Polygon</code> error. The file which occurs the unresolver reference is:</p>
  
  <pre><code>import self.project.polydator.Polygon
  
  interface PolygonResolver {
      fun resolveShape(sides: List&lt;Int&gt;): Polygon
  }
  </code></pre>
  
  <p>The failed task is <code>:usecase:compileKotlin</code>.
  I'm using gradle <code>4.8.1</code>. </p>
  
  <p>I have already tried to executed <code>./gradlew clean</code> before <code>./gradlew bootRun</code>. </p>
  
  <ul>
  <li>EDIT1: I tried to run <code>gradle bootRun</code> instead of using the gradle wrapper. My installed gradle version is <code>4.8</code>.</li>
  <li>EDIT2: I'm using MACOS X</li>
  </ul>
  
  <p>I would really appreciate any help! 
  Thanks!</p>