How to not use gradle in IntelliJ to execute Kotlin main

Viewed 390

I created a simple Kotlin project with the Console template in IntelliJ and running it I am getting the gradle-symbol in the run-toolwindow (cf. picture).

enter image description here

Usually I see in other tutorials that there is the Kotlin symbol so no gradle is used to run the main of the Kotlin-project.

Is there any possibility to change the way to run a Kotlin-main (despite the run configurations, which I took a look at, but did not find a way to change the "run-environment")

I tried the solution:

CTRL + ALT + S to enter Settings > Build, Execution, Deployment > Build Tools > Gradle, switching Build and run using to IntelliJ IDEA, then getting the problem:

enter image description here

Which is closer, but now it seems to get a problem as in Java, what I thought in Kotlin is no problem to have different file names then the actual code-content of the file.

2 Answers

As described in Configure the build and run actions topic use Settings (Preferences on macOS) | Build, Execution, Deployment | Build Tools | Gradle | Build and run using: option and switch it to IntelliJ IDEA:

enter image description here

CTRL + ALT + S to enter Settings then in the left panel choose Build, Execution, Deployment > Build Tools > Gradle, find Build and run using and pick IntelliJ IDEA

Related