title: proper way to run kotlin application from gradle task
body: <p>I've got simple script</p>
  
  <pre><code>package com.lapots.game.journey.ims.example
  
  
  fun main(args: Array&lt;String&gt;) {
      println("Hello, world!")
  }
  </code></pre>
  
  <p>And here is <code>gradle</code> task </p>
  
  <pre><code>task runExample(type: JavaExec) {
      main ='com.lapots.game.journey.ims.example.Example'
      classpath = sourceSets.main.runtimeClasspath
  }
  </code></pre>
  
  <p>But when I try to run task <code>gradle runExample</code> I get error</p>
  
  <p><code>Error: Could not find or load main class com.lapots.game.journey.ims.example.Example</code></p>
  
  <p>What is the proper way to run application?</p>