I am using Kotlin DSL with Gradle build tool. My gradle build works well both locally and on jenkins server when run from command line.
However IDEA complains and marks several items red with the following errors:
I have tried all 3 options in project settings: - Use default gradle wrapper - Use gradle 'wrapper' task configuration - Use local gradle distribuition
Result if pretty same
QUESTION: is something wrong in config, or is there a fix or workaround for that?
IntelliJ IDEA 2018.1.2 (Community Edition)
Build #IC-181.4668.68, built on April 24, 2018
JRE: 1.8.0_152-release-1136-b29 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Linux 4.15.0-20-generic
.
Kotlin plugin: 1.2.41-release-IJ2018.1-1
.
Gradle 4.7
------------------------------------------------------------
Build time: 2018-04-18 09:09:12 UTC Revision: b9a962bf70638332300e7f810689cb2febbd4a6c
Groovy: 2.4.12 Ant: Apache Ant(TM) version 1.9.9 compiled on February 2 2017 JVM: 1.8.0_171 (Oracle Corporation 25.171-b11) OS: Linux 4.15.0-20-generic amd64
UPD: @tweitzel you are right, it was incorrect SDK setting, thanks!
Use the command ./gradlew test to run all tests.
You can resolve gradle by going C:\Users\(user name path)\. gradle and delete this . gradle file build again and make sure you are connected to internet.
in my case I had set a jdk as File->Project Structure... -> Project->Project SDK
instead of setting the Kotlin SDK
after setting Kotlin SDK as Project SDK my build.gradle.kts errors disappeared
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With