# Working Kotlin script

**URL:** <https://discuss.gradle.org/t/working-kotlin-script/19485>\
**Category:** Help/Discuss\
**Created:** [September 12, 2016, 5:50pm UTC](https://discuss.gradle.org/t/working-kotlin-script/19485 "2016-09-12T17:50:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Strannik](https://avatars.discourse-cdn.com/v4/letter/s/278dde/32.png) [@Strannik](https://discuss.gradle.org/u/Strannik)\
**Post date:** [September 12, 2016, 5:50pm UTC](https://discuss.gradle.org/t/working-kotlin-script/19485/1 "2016-09-12T17:50:36Z")

</div>

Hi guys

I try to receive feedback about using Kotlin to write Gradle scripts in Gradle 3.0.

I used this sample script and named it build.gradle.kts. However it seems that Gradle  
doesn’t see it. Whenever I launch “gradle compile” or “gradle clean” commands it produces errors about unrecognized tasks.

apply()

configure {  
mainClassName = “samples.HelloWorld”  
}

configure {  
setSourceCompatibility(1.7)  
setTargetCompatibility(1.7)  
}

repositories {  
jcenter()  
}

dependencies {  
testCompile(“junit:junit:4.12”)  
}
