Closed pankajbsn closed 5 years ago
Changing gradle version from 4.10.2 to 5.0 resolved the issue. After that from command line it worked but Intellij Idea was still giving error. In IDE --> Settings --> Gradle --> Use Local Gradle distribution. And then I set Gradle 5 as home. Then it stopped giving error in IDE as well. Although, I don't understand, why it was not working with Gradle 4.10.2.
Changing gradle version from 4.10.2 to 5.0 resolved the issue. After that from command line it worked but Intellij Idea was still giving error. In IDE --> Settings --> Gradle --> Use Local Gradle distribution. And then I set Gradle 5 as home. Then it stopped giving error in IDE as well. Although, I don't understand, why it was not working with Gradle 4.10.2.
It seems Kotlin plugin in IDEA 2018.3 is broken, upgrade gradle to 5.0 worked for me
Closing as solved
For those who cannot upgrade to Gradle 5.x (e.g. due to a bug in the kotlin-frontend-plugin: https://github.com/Kotlin/kotlin-frontend-plugin/issues/122). There is a workaround for Gradle 4.10.3:
tasks {
"compileKotlin2Js"(Kotlin2JsCompile::class) {
kotlinOptions {
outputFile = ...
sourceMap = true
}
}
}
In Intellij Idea 2018.3 when I create a new KotlinJS gradle project, with kotlin-dsl, In build.gradle.kts it gives me error that "Unresolved reference: compileKotlin2Js". However, when I import hello-js sample project in same IDE, it works fine. I cant figure out what is the difference. I am using the same build.gradle.js as from hello-js sample project.
Expected Behavior
Current Behavior
Context
Steps to Reproduce (for bugs)
Your Environment
gradle --version
About
menu you can copy version information)Configure Kotlin Plugin Updates
preference panel)