title: Attempting to use Kotlin Native with IntelliJ's base project but it won't compile
body: <p>Hi I'm learning about Kotlin Native and as such I wanted to start with getting a project compiled and running, using IntelliJ's provided Kotlin Native files I get the following error: (Using: "gradle build")</p>
  
  <pre><code> Execution failed for task ':compileKotlinMingw'.
   &gt; Process 'command 'C:\Program Files (x86)\Java\jdk1.8.0_181\bin\java.exe'' finished with non-zero exit value 1
  </code></pre>
  
  <p>How do I get it working?</p>
  
  <p>The build.gradle:</p>
  
  <pre><code>plugins {
  id 'kotlin-multiplatform' version '1.3.10'
  }
  repositories {
       mavenCentral()
  }
  kotlin {
       targets {
           // For ARM, preset should be changed to presets.iosArm32 or presets.iosArm64
      // For Linux, preset should be changed to e.g. presets.linuxX64
      // For MacOS, preset should be changed to e.g. presets.macosX64
      fromPreset(presets.mingwX64, 'mingw')
  
      configure([mingw]) {
          // Comment to generate Kotlin/Native library (KLIB) instead of executable file:
          compilations.main.outputKinds('EXECUTABLE')
          // Change to specify fully qualified name of your application's entry point:
          compilations.main.entryPoint = 'sample.main'
      }
  }
  sourceSets {
      // Note: To enable common source sets please comment out 'kotlin.import.noCommonSourceSets' property
      // in gradle.properties file and re-import your project in IDE.
      mingwMain {
      }
      mingwTest {
      }
  }
  }
  
  task runProgram {
  def buildType = 'release' // Change to 'debug' to run application with debug symbols.
  dependsOn "link${buildType.capitalize()}ExecutableMingw"
  doLast {
      def programFile = kotlin.targets.mingw.compilations.main.getBinary('EXECUTABLE', buildType)
      exec {
          executable programFile
          args ''
      }
  }
  }
  </code></pre>
  
  <p>settings.gradle:</p>
  
  <pre><code>pluginManagement {
  resolutionStrategy {
      eachPlugin {
          if (requested.id.id == "kotlin-multiplatform") {
              useModule("org.jetbrains.kotlin:kotlin-gradle-
  plugin:${requested.version}")
              }
          }
      }
  }
  rootProject.name = 'native_test'
  </code></pre>
  
  <p>SampleMingw.kt:</p>
  
  <pre><code>package sample
  
  fun hello(): String = "Hello, Kotlin/Native!"
  
  fun main(args: Array&lt;String&gt;)
  {
      println(hello())
  }
  </code></pre>
  
  <p>Stacktrace:</p>
  
  <pre><code>* Exception is:
  org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':compileKotlinMingw'.
      at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:110)
      at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:77)
      at org.gradle.api.internal.tasks.execution.OutputDirectoryCreatingTaskExecuter.execute(OutputDirectoryCreatingTaskExecuter.java:51)
      at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:59)
      at org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:54)
      at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:59)
      at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:101)
      at org.gradle.api.internal.tasks.execution.FinalizeInputFilePropertiesTaskExecuter.execute(FinalizeInputFilePropertiesTaskExecuter.java:44)
      at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:91)
      at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:62)
      at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:59)
      at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54)
      at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
      at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34)
      at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.run(EventFiringTaskExecuter.java:51)
      at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:300)
      at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:292)
      at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:174)
      at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:90)
      at org.gradle.internal.operations.DelegatingBuildOperationExecutor.run(DelegatingBuildOperationExecutor.java:31)
      at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:46)
      at org.gradle.execution.taskgraph.LocalTaskInfoExecutor.execute(LocalTaskInfoExecutor.java:42)
      at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareWorkItemExecutor.execute(DefaultTaskExecutionGraph.java:277)
      at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareWorkItemExecutor.execute(DefaultTaskExecutionGraph.java:262)
      at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$ExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:135)
      at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$ExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:130)
      at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$ExecutorWorker.execute(DefaultTaskPlanExecutor.java:200)
      at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$ExecutorWorker.executeWithWork(DefaultTaskPlanExecutor.java:191)
      at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$ExecutorWorker.run(DefaultTaskPlanExecutor.java:130)
      at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
      at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
      at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
  Caused by: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files (x86)\Java\jdk1.8.0_181\bin\java.exe'' finished with non-zero exit value 1
      at org.gradle.process.internal.DefaultExecHandle$ExecResultImpl.assertNormalExitValue(DefaultExecHandle.java:395)
      at org.gradle.process.internal.DefaultJavaExecAction.execute(DefaultJavaExecAction.java:37)
      at org.gradle.api.internal.file.DefaultFileOperations.javaexec(DefaultFileOperations.java:225)
      at org.gradle.api.internal.project.DefaultProject.javaexec(DefaultProject.java:1102)
      at org.jetbrains.kotlin.compilerRunner.KonanCliRunner.run(KotlinNativeToolRunner.kt:127)
      at org.jetbrains.kotlin.gradle.tasks.KotlinNativeCompile.compile(KotlinNativeTasks.kt:296)
      at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73)
      at org.gradle.api.internal.project.taskfactory.StandardTaskAction.doExecute(StandardTaskAction.java:46)
      at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:39)
      at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:26)
      at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:801)
      at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:768)
      at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$1.run(ExecuteActionsTaskExecuter.java:131)
      at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:300)
      at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:292)
      at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:174)
      at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:90)
      at org.gradle.internal.operations.DelegatingBuildOperationExecutor.run(DelegatingBuildOperationExecutor.java:31)
      at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:120)
      at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:99)
      ... 31 more
  </code></pre>
  
  <p>Added above stracktrace with gradle build --stacktrace</p>