title: .kts script in a Gradle project
body: <p>I have a Kotlin Gradle project. </p>
  
  <p>If I create a <code>.kts</code> file it runs in InteliJ alright <em>except</em> when it is in the <code>/src/main/kotlin</code> folder. </p>
  
  <p>IDEA highlights the whole file in red.
  Gradle throws out compilation exception.
  The exception is </p>
  
  <pre><code>...src/main/kotlin/test.kts: (3, 1): Cannot access script base class 'kotlin.script.templates.standard.ScriptTemplateWithArgs'. Check your module classpath for missing or conflicting dependencies`. 
  </code></pre>
  
  <p>What is the problem?</p>
  
  <p>My <code>build.gradle</code>:</p>
  
  <pre><code>plugins {
      id 'org.jetbrains.kotlin.jvm' version '1.3.0-rc-131'
  }
  
  group 'kotlin.tutorials.coroutines'
  version '1.0-SNAPSHOT'
  
  repositories {
      maven {     url 'http://dl.bintray.com/kotlin/kotlin-eap' }
      mavenCentral()
      jcenter()
      maven { url "https://dl.bintray.com/kotlin/ktor" }
  }
  
  ext.ktor_version = '1.0.0-alpha-1'
  ext.coroutines_version = '0.30.2-eap13'
  
  dependencies {
      compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
      compile "io.ktor:ktor-server-netty:$ktor_version"
      compile "ch.qos.logback:logback-classic:1.2.3"
  
      //KTOR features
      compile "io.ktor:ktor-jackson:$ktor_version"
      compile "io.ktor:ktor-auth:$ktor_version"
      compile "io.ktor:ktor-auth-jwt:$ktor_version"
      compile "io.ktor:ktor-freemarker:$ktor_version"
      compile "io.ktor:ktor-html-builder:$ktor_version"
  }
  
  compileKotlin.kotlinOptions.jvmTarget = "1.8"
  compileTestKotlin.kotlinOptions.jvmTarget = "1.8"
  </code></pre>