title: Why does IntelliJ start my Kotlin Gradle program despite of compilation errors
body: <p>I have a standard JVM Kotlin project set up with IntelliJ IDEA. In the following image you can see my run configuration.
  <a href="https://i.stack.imgur.com/s7kJC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/s7kJC.png" alt="IntelliJ Run Debug configuration screenshot"></a></p>
  
  <p>Currently I am having compile errors (as by <code>Build Project</code> Ctrl + F9)
  <a href="https://i.stack.imgur.com/CGnd4.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/CGnd4.png" alt="Proof of compile error"></a></p>
  
  <p>However, if I execute the run configuration the program is executed. Definitly not the current version as I have compile errors.</p>
  
  <p><strong>Actual behavior:</strong> Run config executes program despite having compile errors and project build fails</p>
  
  <p><strong>Expected behavior:</strong> Run configuration fails on build project and does not start an older version of my program</p>
  
  <p>IntelliJ version:</p>
  
  <pre><code>IntelliJ IDEA 2019.1.2 (Ultimate Edition)
  Build #IU-191.7141.44, built on May 7, 2019
  JRE: 11.0.2+9-b159.56 amd64
  JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
  Windows 10 10.0
  </code></pre>
  
  <p>Thank you for your assistance</p>