i start a thread
# gradle
a
i start a thread
so yes the build works in command line
settings.gradle :
Copy code
rootProject.buildFileName = 'build.gradle.kts'
rootProject.name = 'gradle-kotlin'
g
Do you use Idea 2017.1?
a
build.gradle.kts:
Copy code
buildscript {

    repositories {
        gradleScriptKotlin()
    }

    dependencies {
        classpath(kotlinModule("gradle-plugin"))
    }
}

plugins {
    application
}

apply {
    plugin("kotlin")
}

application {
    mainClassName = "samples.HelloWorldKt"
}

repositories {
    gradleScriptKotlin()
}

dependencies {
    compile(kotlinModule("stdlib"))
}
yes
g
Did you tried to invalidate caches?
a
i doing it in few seconds
g
message has been deleted
a
its getting red after few seconds...
g
Maybe you could reproduce it on sample project and create an issue
a
i will try it again on a sample project
hum i can import samples...
it seems I had create the project from cratch (and not imported) and idea does not detect build.gradle.kts
so it does not apply gradle plugin
w
I’ve had the same things. @alband have you tried to import gsk sample from github? Not write your own, but only open existing project?
a
yes,it worked
I remove all .idea, *.iml from project & reimport it & it worked...
now i'm trying to configure kotloin plugin (compileKotlin in gradle) but its not recognise
g
Do you mean configure compileKotlin block? To set jvm target etc?
If yes, you should use task configuration syntax:
Copy code
tasks.withType<KotlinJvmCompile> {
    kotlinOptions {
        jvmTarget = "1.8"
    }
}
a
hey thanks !
that was it ❤️