# Gradle can't build Kotlin

**URL:** <https://discuss.kotlinlang.org/t/gradle-cant-build-kotlin/4018>\
**Category:** Support\
**Created:** [August 4, 2017, 12:19am UTC](https://discuss.kotlinlang.org/t/gradle-cant-build-kotlin/4018 "2017-08-04T00:19:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![glorantq](https://avatars.discourse-cdn.com/v4/letter/g/57b2e6/32.png) [@glorantq](https://discuss.kotlinlang.org/u/glorantq)\
**Post date:** [August 4, 2017, 12:19am UTC](https://discuss.kotlinlang.org/t/gradle-cant-build-kotlin/4018/1 "2017-08-04T00:19:03Z")

</div>

When I try to build my kotlin project with Gradle it shows `NO-SOURCE` both for compileKotlin and compileJava  
`gradlew build` output:

```
:clean
:compileKotlin NO-SOURCE
:compileJava NO-SOURCE
:copyMainKotlinClasses
:processResources NO-SOURCE
:classes UP-TO-DATE
:jar
:assemble
:compileTestKotlin NO-SOURCE
:compileTestJava NO-SOURCE
:copyTestKotlinClasses
:processTestResources NO-SOURCE
:testClasses UP-TO-DATE
:test NO-SOURCE
:check UP-TO-DATE
:build

BUILD SUCCESSFUL

```

My build.gradle:  
group ‘mysticlands’  
version ‘1.0-SNAPSHOT’

```
buildscript {
    ext.kotlin_version = '1.1.3-2'

    ext.bungee_api_version = "1.12-SNAPSHOT"
    ext.kryonet_version = "2.21-2"

    repositories {
        mavenCentral()
    }
    dependencies {
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    }
}

apply plugin: 'kotlin'

repositories {
    mavenCentral()

    maven { url "https://oss.sonatype.org/content/groups/public/" }
    maven { url "http://clojars.org/repo/" }
}

dependencies {
    compile "org.jetbrains.kotlin:kotlin-stdlib-jre8:$kotlin_version"

    compile "net.md-5:bungeecord-api:$bungee_api_version"
    compile "kryonet:kryonet:$kryonet_version"
}

compileKotlin {
    kotlinOptions.jvmTarget = "1.8"
}
compileTestKotlin {
    kotlinOptions.jvmTarget = "1.8"
}

```

Any my folder structure:  
 ![yes](https://us1.discourse-cdn.com/flex019/uploads/kotlinlang/original/2X/a/af5848386698ace77c5ec5f33a64c611a9ee1529.PNG)

I started in the default project IDEA generates when I select Kotlin under the Gradle project type.

---

<div class="post-metadata">

**Author:** ![h0tk3y](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/h0tk3y/32/1781_2.png) [@h0tk3y](https://discuss.kotlinlang.org/u/h0tk3y)\
**Post date:** [August 4, 2017, 4:14pm UTC](https://discuss.kotlinlang.org/t/gradle-cant-build-kotlin/4018/2 "2017-08-04T16:14:00Z")

</div>

@glorantq Please make sure that the Gradle project directory is the one that contains `src`. You can do that by adding `println projectDir` to your `build.gradle` and running a Gradle build.

If you could share the project (even the basic structure, the build script and folders without all the actual source files), I would look at it more closely. Currently, I can’t figure out what else might be the cause.
